Skip to content

Team334/gear-detector

Repository files navigation

Gear Detector for FIRST Steamworks

Forked from weiliu89/caffe

This is a CNN (convolutional neural network) for detecting the gear game pieces in FIRST Steamworks. It uses the SSD architecture.

Installation

Follow the installation instructions from weiliu89/caffe.

Preparing Data

Setup environment variables:

Set $CAFFE_ROOT to the directory caffe is in:

export CAFFE_ROOT=<your caffe installation path>

Download VGGNet

This downloads a pretrained VGGNet model. Warning: this will download an 82 MB file.

mkdir  -p $CAFFE_ROOT/models/VGGNet
cd $CAFFE_ROOT/models/VGGNet
wget http://cs.unc.edu/~wliu/projects/ParseNet/VGG_ILSVRC_16_layers_fc_reduced.caffemodel

Download the gear training data:

mkdir -p ~/data/VOCdevkit_STEAMWORKS
cd ~/data/VOCdevkit_STEAMWORKS
git clone https://github.com/Team334/gear-data.git GearData

Create LMDB files:

cd $CAFFE_ROOT
./data/STEAMWORKS/create_data.sh

Training

Train the model using examples/ssd/ssd_pascal_steamworks.py:

cd $CAFFE_ROOT
python examples/ssd/ssd_pascal_steamworks.py

You can change the script to suite your needs:

  • The GPUs to use can be specified here.
  • The number of iterations to run can be specified here