Jetson Inference Custom Data Training Error

Hi,

I watched Jetson Inference S3E5. I’m trying to train my own custom data model but I’m getting some errors. How can I fix this. And how can I train my custom data model with images instead of taking pictures on live camera?

Hi @sabtech2016, what are the contents of your image sets files in your datasets under ImageSets/? Do you have files like trainval.txt and test.txt?

You can use CVAT tool to annotate existing images, and then export them from CVAT in Pascal VOC format. Finally, create a labels.txt file for your dataset (CVAT does not do this)

Yes I have trainval.txt and train.txt , but there is no test.txt file. I used the “LabelImg” program to label the photos I took from my phone. But I did this on my Windows computer. Should I label the images all over again? I had made a Tensorflow Object Detection model in Windows but couldn’t run it on Jetson Nano.

For now, try copying trainval.txt to test.txt.

Can you upload trainval.txt here so I can take a look?

Here:
trainval.txt (13.2 KB)

At a glance, that looks ok to me, but if you still get the “ascii decode” error after copying test.txt, please send me your dataset and I will try it.

This is my dataset:

I would be very grateful to you if you can solve this. I’m in a competition right now and have to run it by Sunday evening. Thanks in advance

OK, for some reason I needed to convert the encoding of your ImageSet files to UTF-8. Attached is the working trainval.txt that you can use (and also copy it to train.txt and test.txt)

trainval.txt (13.2 KB)

Also, your labels.txt needed corrected to Yabani_Ot (note the underscore, which is how it is referenced from the XML annotation files)

Omg thank u soooo much!! It worked!! I just want to ask one more question. I’m trying to turn this model into a python script. I watched the jetson inference s3e4 episode completely but my script doesn’t see my model path. I couldn’t solve it.

And can I put a point like a crosshair in the middle of the camera and detect whether the detected object touches the point?

Thank you so much again!

You may need to make sure the path you are using is correct relative to the directory you are executing your script from, or use absolute paths. You can also put your model under jetson-inference/data/networks folder and it will search that path too.

Can I run my model outside the docker?

I searched on the internet, but there is no folder named build in the jetson-inference file.

Yes, if you built jetson-inference from source outside of docker, then you don’t need to use docker if you don’t want to.

Hello, it’s me again. Model’s train got stuck at epoch 132 and had to start over. I’m trying to train 500 epochs. Is this a good thing I did? My loss value so far is 1.9. Is this good value? I have to complete this within 24 hours. Is there anything that can be done to fix this?

You can use the --resume flag to train_ssd.py to restart training from an existing checkpoint. The loss value depends on the dataset, as some datasets are different or more challenging than others.