Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

How to teach Darknet a new object ?

0 votes
So I like the darknet object recognition, and would like to start with teaching it some new, useful objects, and maybe stop looking for some hundreds of others.

how to ?

I've read, http://jevois.org/basedoc/classDarknetSingle.html  and lots of http://jevois.org/tutorials/ and cannot find any information on that anywhere.
asked Oct 17, 2017 in User questions by VCD (120 points)

1 Answer

+1 vote

Basically, you use the regular mainline darknet to design and train your network using the fastest and most expensive GPU you can afford. Then you copy the trained weights and network config files to microSD for JeVois to use.

Here is what we are doing here (still training on imagenet, though, but looks promising):

- get and install the baseline darknet from https://github.com/pjreddie/darknet onto a Linux PC with high-end GPU. Try it with some of the pre-trained networks and make sure it works (had issues here where turning on cuDNN made the pre-trained nets give us random results).

- download or create your training set of images (for ImageNet, you need to register first, then they will give you access).

- You then need to create 3 text files that are just lists of all training, validation and test images. We basically followed the instructions here: https://pjreddie.com/darknet/train-cifar/

- you also need to create a file with labels (object names), and organize your images accordingly.

- create a cfg file for your dataset, see cifar example again.

- then create a cfg file for your network. The cifar example helps here too.

- finally, train using something like

./darknet classifier train cfg/my_dataset.cfg cfg/my_network.cfg

if you add several GPUs, add -gpus 0,1

if you run out of GPU memory, inccrease subdivisions in your network cfg file

Once your network is trained, copy the network cfg file, data cfg, labels, and trained weights to JeVois. Right now, DarknetSingle does not auto discover new networks, we may add this in the future. So just overwrite the cfg and weight files of tiny darknet with your cfg and weight files.

answered Oct 25, 2017 by JeVois (46,580 points)
...