thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

Found a bug if there are multiple objects in the same cell during training #356

Open zlmlaker opened 7 years ago

zlmlaker commented 7 years ago

The _batch func in data.py seems to neglect some cases where there are more than one objects centered in the same cell. The produced label only takes the last object into consideration. So the network only cares about one image in the each cell during training. It seems a bug to me because in darknet each gt-box is treated independently even if there are more than one object in a cell.

simonxue commented 7 years ago

I've read the code and agree with you. According to YOLO9000 paper, "Multi-Scale Training" might be able to mitigate this problem. Introducing some kind of randomness in the ground truth bbox selection might help too.

zsdonghao commented 6 years ago

hi, I found this bug yesterday, it seems the author just simply copy the code from yolo1. Anyone solved this problem?