toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

Training on own dataset #43

Open ammaradel opened 4 years ago

ammaradel commented 4 years ago

Is it possible to train the network on my own dataset?

inFreedom92 commented 4 years ago

Yes, I think so. If you could make dataset and dataloader, which outputs same format as VOC or COCO in this repository then it might work.

nigyiii commented 4 years ago

just organize your dataset in VOC style or COCO style, then change num_classes in train.py and dataset path in voc0712.py / coco.py

lgl603 commented 4 years ago

How to set the value of num_classes? Is the num_classes equals the real classes of objects, or num_classes = "real classes of object +1"?

inFreedom92 commented 4 years ago

@lgl603

How to set the value of num_classes? Is the num_classes equals the real classes of objects, or num_classes = "real classes of object +1"?

it's "real classes of object +1" as I know

alen-mask commented 4 years ago

@lgl603

How to set the value of num_classes? Is the num_classes equals the real classes of objects, or num_classes = "real classes of object +1"?

it's "real classes of object +1" as I know

hi @inFreedom92 ,

what about class names and thresholds_for_classes? i guess class name is just a label for model, but the thresholds is totally different for different objects and image sources.

inFreedom92 commented 4 years ago

@alen-mask Do you mean class name something like this? VOC_CLASSES = ( # always index 0 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor') I made my own CUSTOM_CLASSES but I don't use it now. Because I use my own transform... Last, I didn't change anything about thresholds in training. I don't know how it works... I just use thresholds in demo.py to see how the model inference.

I'm sorry that I'm not helpful.

alen-mask commented 4 years ago

@alen-mask Do you mean class name something like this? VOC_CLASSES = ( # always index 0 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor') I made my own CUSTOM_CLASSES but I don't use it now. Because I use my own transform... Last, I didn't change anything about thresholds in training. I don't know how it works... I just use thresholds in demo.py to see how the model inference.

I'm sorry that I'm not helpful.

Thanks very much for your reply. According previous mrcnn finetuning experience, the thresholds does not need to be changed. Maybe the model is not trained enough yet .

lgl603 commented 4 years ago

@lgl603

How to set the value of num_classes? Is the num_classes equals the real classes of objects, or num_classes = "real classes of object +1"?

it's "real classes of object +1" as I know

The num_classes in "datasets/coco.py" is 80 for COCO datasets, so it should be "real calsses of object". However, the problem "no boxes to NMS" occurs when inferencing my own trained model.

lgl603 commented 4 years ago

@lgl603

How to set the value of num_classes? Is the num_classes equals the real classes of objects, or num_classes = "real classes of object +1"?

it's "real classes of object +1" as I know

hi @inFreedom92 ,

what about class names and thresholds_for_classes? i guess class name is just a label for model, but the thresholds is totally different for different objects and image sources.

Thanks very much for your reply! The num_classes in "datasets/coco.py" is 80 for COCO datasets, so it should be "real calsses of object". However, the problem "no boxes to NMS" occurs when inferencing my own trained model.

wanglaotou commented 4 years ago

i trained my own dataset like voc datasets, but after trained 65 epochs its map is 0.0 and no boxes to nms, have you met this problem?

CraigWang1 commented 4 years ago

@wanglaotou I have also trained on my own dataset, and it also says that the map is 0.0 and there are no boxes to nms. Currently looking for a solution

yushi-okuinishi commented 4 years ago

@wanglaotou @CraigWang1 I also got that the map is 0.0 XD

CraigWang1 commented 4 years ago

@yushi-okuinishi Lol I solved it by switching over to the signatrix efficientdet implementation that you can also find on Github. (no disrespect or offense intended to toandaominh, it is extremely difficult to code a huge project like this)

yushi-okuinishi commented 4 years ago

@CraigWang1 Thank you. I try it

NAcvat commented 4 years ago

The signatrix efficientdet implementation worked for you?

CraigWang1 commented 4 years ago

@NAcvat Yes for effiicientdet-d0, although efficientdet by itself is an unproven toddler compared to the proven models like Yolov3, so I'm iffy on using it.