Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shonehang opened this issue Nov 30, 2018 · 3 comments
Open

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

shonehang opened this issue Nov 30, 2018 · 3 comments

Comments

@shonehang
Copy link

shonehang commented Nov 30, 2018

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
Copy link
Author

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

@rw1995
Copy link

rw1995 commented Mar 31, 2019

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
Copy link

rw1995 commented Mar 31, 2019

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

give me some reminds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants