Detectnet, a bit confused here

Hi,

I tagged around 70 images from different angels over at CVAT.org of this game character:

t1

Exported the data set using PVOC and trained everything with an average loss of ~0.02 (30 Epochs). Unfortunately the result looks like this:

terr_1 terr_2

The same goes for the webcam, everything is green.

I am pretty sure I am doing something wrong but I don’t now what.
(No errors anywhere in the process)

Best wishes,
Dennis

Hi Dennis, are the training images bigger than this?

i.e. do they include ample background? or all the images themselves tightly cropped to the character?

The images should include background space as well - not tightly cropped around the character.

@dusty_nv

I made the images larger and it worked better as you said! But I did encounter another problem.

CVAT crashed a couple of times so I used Labelbox for annotation and exported a .JSON.

I Imported the .JSON and images to Roboflow for a Pascal VOC export. But the file structure differs from the CVAT export:

CVAT
cvat

From Roboflow the .xml files are in the same map as the images in a train/valid/test structure.

robo

How would I go about training a model in the above filestructure using:

python3 train_ssd.py --dataset-type=voc --data=data/<YOUR-DATASET> --model-dir=models/<YOUR-MODEL>

/Dennis

OK great! You will need to re-organize the files from the Roboflow to be like CVAT - CVAT automatically exports close to Pascal VOC format.

- Annotations/     # put all of your XML files here   
- ImageSets/Main/  # make *.txt files with a list of image ID's
- JPEGImages/      # put all of your images here
- labels.txt       # create this with your class ID's

Inside ImageSets/Main, there should be the following files:

test.txt  train.txt  trainval.txt  val.txt

Each of these contains the list of imageID’s used for train/val/test. It is one imageID per line Iwithout the .jpg extension). You can typically make a script to create these txt files for you. A snippet of one of mine looks like:

20200917-163443
20200917-163518
20200917-163528
20200917-163539
20200917-163553

In Pascal VOC, there aren’t subdirectories for train/val/test. All of the images and XML files go into JPEGImages/ and Annotations/, respectively.