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

AssertionError: labels.txt and cfg/yolov2.cfg indicate inconsistent class numbers #859

Open RYucel opened 6 years ago

RYucel commented 6 years ago

After I updated the weights and cft to yolov2 I got this error.

AssertionError: labels.txt and cfg/yolov2.cfg indicate inconsistent class numbers

How I can fix it? (OS:Ubuntu 17)

jeremiahharbach commented 6 years ago

How many lines in your 'labels.txt' file?

In cfg/yolov2.cfg, how many classes in

[region]
classes=?

The number of lines in labels.txt should equal the number of classes in cfg/yolov2.cfg.

See steps 2 and 4 for more info: https://github.com/thtrieu/darkflow#training-on-your-own-dataset