Using the jetson inference docker container by dusty, this project aims to train a detection model for the yellow Robomaster Mineral that is used during the robomaster competition. The barcode on the cube is essential that it must face a certain way in order to trade for coins.
$ cd
$ sudo apt-get update
$ sudo apt-get install git cmake libpython3-dev python3-numpy
$ git clone --recursive https://github.com/dusty-nv/jetson-inference
$ cd jetson-inference
$ mkdir build
$ cd build
$ cmake ../
$ make
$ sudo make install
$ sudo ldconfig
$ docker/run.sh
$ cd python/training/detection/ssd/data
$ mkdir cube
Open another terminal
$ cd jetson-inference/python/training/detection/ssd/data/cube
$ touch labels.txt
Open a text editor and edit the labels.txt file
add some labels
R
Barcode
then save and exit the text editor
$ cd jetson-inference/python/training/detection/ssd
$ camera-capture /dev/video0
(the video0 depends on your video feed)
Change dataset type to detection , Dataset path to ssd/data/cube, Class labels to labels.txt, Then collect data for train, val, and test
Once have enough data, close the video window
$ python3 train_ssd.py -–dataset-type=voc –-data=data/cube –-model-dir=models/cube –-batch-size=2 --workers=1 –-epochs=10
$ python3 onnx_export.py –-model-dir=models/cube
$ detectnet –-model=models/cube/ssd-mobilenet.onnx –-labels=models/cube/labels.txt –-input-blob=input_0 –-output-cvg=scores –-output-bbox=boxes