Hello,
I tell them that I was carrying out a training labeling of 1000 objects with the data capture control of the jetson nano.
After that, I tried to do the training and I got the following error:
From what I can see in the image indicated in the error I did not put any label and this is causing the error.
I am concerned because the labeling job was very long with respect to time.
I hope you can help me.
Greetings
A. Garcés
Hi,
train_ssd.py apply supervised learning.
So you will need a dataset containing input-output pairs.
Below is a tutorial of collecting database for your reference:
<img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-header.jpg" width="100%">
<p align="right"><sup><a href="pytorch-plants.md">Back</a> | <a href="../README.md#hello-ai-world">Next</a> | </sup><a href="../README.md#hello-ai-world"><sup>Contents</sup></a>
<br/>
<sup>Transfer Learning - Object Detection</sup></s></p>
# Collecting your own Detection Datasets
The previously used `camera-capture` tool can also label object detection datasets from live video:
<img src="https://github.com/dusty-nv/jetson-inference/raw/dev/docs/images/pytorch-collection-detect.jpg" >
When the `Dataset Type` drop-down is in Detection mode, the tool creates datasets in [Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC/) format (which is supported during training).
> **note:** if you want to label a set of images that you already have (as opposed to capturing them from camera), try using a tool like [`CVAT`](https://github.com/openvinotoolkit/cvat) and export the dataset in Pascal VOC format. Then create a labels.txt in the dataset with the names of each of your object classes.
## Creating the Label File
Under `jetson-inference/python/training/detection/ssd/data`, create an empty directory for storing your dataset and a text file that will define the class labels (usually called `labels.txt`). The label file contains one class label per line, for example:
``` bash
This file has been truncated. show original
Thanks.
Hi,
I tell you that with the method that I used in a previous training if it worked.
In the final labeling it seems that I made a mistake by not placing a label on an image, according to the error that the terminal shows, do you think the existing database can be corrected?
Hi @agarcesc7 , I believe you should be able to work around the issues with the dataset by modifying the code in voc_dataset.py
:
https://github.com/dusty-nv/pytorch-ssd/blob/8ed842a408f8c4a8812f430cf8063e0b93a56803/vision/datasets/voc_dataset.py#L123
Try wrapping the calls to ET.parse(annotation_file).findall("object")
in try/except blocks and handle the case when there are 0 annotations in the file.
Hi Dusty,
Would any of these 2 options apply to correct the warning?
Hi @agarcesc7 , I would leave the #1 code block unmodified (as it was before), because if the image doesn’t have any annotations then should be skipped.
#2 looks okay, except set objects = []
in the except
clause. Also I believe there is a second occurrence of ET.parse(annotation_file).findall("object")
in voc_dataset.py to handle.
Thanks a lot Dusty, it worked.
system
Closed
January 18, 2022, 7:25pm
11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.