yolo2-pytorch icon indicating copy to clipboard operation
yolo2-pytorch copied to clipboard

How to use COCO model ?

Open cory8249 opened this issue 8 years ago • 3 comments

Hi @longcw ,

Thank you for sharing this awesome implementations. Actually I found this is the only one which runs as fast as YOLO's original darknet C code. I have some questions:

Is is possible to use 80-class COCO instead of 20-class PASCAL ? How to convert pre-trained PASCAL weight to HDF5 file? Or it is train by yourself (not converted from YOLO's original one) ?

Thank you.

cory8249 avatar Mar 28 '17 18:03 cory8249

Of course, you can train YOLO on coco dataset. You first have to write a config file for coco just like yolo2-pytorch/cfgs/config_voc.py, and then implement a data loader for coco dataset. I recommend you to use torch.utils.data to load dataset instead of the original imdb.py. It is much more elegant. Here you can find a implemented interface for coco.

The HDF5 file is converted from the weight file released by the author of YOLO. I use darkflow to load the original binary weight file.

This project still cannot train yolo2 well. I only got a ~50mAP on VOC2007. Maybe the low mAP is caused by improper training strategy or the insufficient data. You can read more here.

longcw avatar Mar 29 '17 05:03 longcw

I am a beginner about hdf5. If possible, I want to know the procedure how to convert .weights files to .h5.

hacunamatada avatar Apr 05 '17 07:04 hacunamatada

Hi, @longcw, I have the same question. BTW, I found that the network structure yolo-voc in DarkFlow is slightly different from the one here. Am I missing something?

Jiaming-Liu avatar Apr 22 '17 07:04 Jiaming-Liu