I am currently working on a project that uses object detection to sort rubbish into recyclable and non-recyclable. I have taken some images (around 200 I think) and I am trying to retrain SSD Mobilenet within the docker container. However, I keep getting an OSError and supposedly “trainval.txt” does not exist, but when i look in the local file manager, the file is present.
Here’s the log:
root@ubuntu:/jetson-inference/python/training/detection/ssd# python3 train_ssd.py --dataset-type=voc --data=data/RubbishData --model-dir=models/rubbish_sorter_models --batch-size=2 --workers=1 --epoch=1
2023-05-26 22:41:43 - Using CUDA…
2023-05-26 22:41:43 - Namespace(balance_data=False, base_net=None, base_net_lr=0.001, batch_size=2, checkpoint_folder=‘models/rubbish_sorter_models’, dataset_type=‘voc’, datasets=[‘data/RubbishData’], debug_steps=10, extra_layers_lr=None, freeze_base_net=False, freeze_net=False, gamma=0.1, log_level=‘info’, lr=0.01, mb2_width_mult=1.0, milestones=‘80,100’, momentum=0.9, net=‘mb1-ssd’, num_epochs=1, num_workers=1, pretrained_ssd=‘models/mobilenet-v1-ssd-mp-0_675.pth’, resolution=300, resume=None, scheduler=‘cosine’, t_max=100, use_cuda=True, validation_epochs=1, validation_mean_ap=False, weight_decay=0.0005)
2023-05-26 22:44:43 - model resolution 300x300
2023-05-26 22:44:43 - SSDSpec(feature_map_size=19, shrinkage=16, box_sizes=SSDBoxSizes(min=60, max=105), aspect_ratios=[2, 3])
2023-05-26 22:44:43 - SSDSpec(feature_map_size=10, shrinkage=32, box_sizes=SSDBoxSizes(min=105, max=150), aspect_ratios=[2, 3])
2023-05-26 22:44:43 - SSDSpec(feature_map_size=5, shrinkage=64, box_sizes=SSDBoxSizes(min=150, max=195), aspect_ratios=[2, 3])
2023-05-26 22:44:43 - SSDSpec(feature_map_size=3, shrinkage=100, box_sizes=SSDBoxSizes(min=195, max=240), aspect_ratios=[2, 3])
2023-05-26 22:44:43 - SSDSpec(feature_map_size=2, shrinkage=150, box_sizes=SSDBoxSizes(min=240, max=285), aspect_ratios=[2, 3])
2023-05-26 22:44:43 - SSDSpec(feature_map_size=1, shrinkage=300, box_sizes=SSDBoxSizes(min=285, max=330), aspect_ratios=[2, 3])
2023-05-26 22:44:45 - Prepare training datasets.
Traceback (most recent call last):
File “train_ssd.py”, line 260, in
target_transform=target_transform)
File “/jetson-inference/python/training/detection/ssd/vision/datasets/voc_dataset.py”, line 44, in init
raise IOError(f"missing ImageSet file {image_sets_file}")
OSError: missing ImageSet file data/RubbishData/ImageSets/Main/trainval.txt
I would really appreciate it if anyone could help me out here.
Also, I was wondering if it is possible to output extra text after the detection box text while running detectNet - e.g. (Plastic Bottle 89.96% - Recyclable). If that is not possible, is there an option to change the colours of the boxes, such that there may be something like a green box for recyclable and a red box for non recyclable? I hope that’s clear.