ssds.pytorch icon indicating copy to clipboard operation
ssds.pytorch copied to clipboard

How can I organize my own dataset for 1 class like voc?

Open shonehang opened this issue 6 years ago • 3 comments

I have trained “yolo_v3_mobilenetv2_voc” and “ssd_lite_mobilenetv2_train_voc” successfully. So I want to train my own data, just 1 class: car, I have prepared “Annotations” and “JPEGImages”. I have changed NUM_CLASSES to 2 in yml file and VOC_CLASSES (...) to VOC_CLASSES = ( 'car', 'background') in voc.py. But I have no idea about txt files in ImageSets/Main, now I just have a trainval.txt which just contains the ids of the images. so I have the error: Dimension out of range (expected to be in range of [-1,0), but got 1) What additional txt file do I need?What else do I need to modify? Thank you very much.

shonehang avatar Nov 30 '18 10:11 shonehang

I have solved this problem. Just switch VOC_CLASSES = ( 'car', 'background') to VOC_CLASSES = ( 'background','car')

shonehang avatar Dec 03 '18 05:12 shonehang

can you give me some help? I load voc2007 in ssds.pytorch/data file . but when I do python train.py --cfg=./experiments/cfgs/fssd_vgg16_train_voc.yml . something is wrong

Traceback (most recent call last): File "train.py", line 20, in from lib.ssds_train import train_model File "/home/rw/ssds.pytorch/ssds.pytorch-master/lib/ssds_train.py", line 23, in from lib.dataset.dataset_factory import load_data File "/home/rw/ssds.pytorch/ssds.pytorch-master/lib/dataset/dataset_factory.py", line 2, in from lib.dataset import coco File "/home/rw/ssds.pytorch/ssds.pytorch-master/lib/dataset/coco.py", line 13, in from lib.utils.pycocotools.coco import COCO File "/home/rw/ssds.pytorch/ssds.pytorch-master/lib/utils/pycocotools/coco.py", line 55, in from . import mask as maskUtils File "/home/rw/ssds.pytorch/ssds.pytorch-master/lib/utils/pycocotools/mask.py", line 3, in import lib.utils.pycocotools._mask as _mask ImportError: No module named 'lib.utils.pycocotools._mask'

which python is yours? and how to train ?

rw1995 avatar Mar 31 '19 12:03 rw1995

I have solved this problem. Just switch VOC_CLASSES = ( 'car', 'background') to VOC_CLASSES = ( 'background','car')

give me some reminds

rw1995 avatar Mar 31 '19 12:03 rw1995