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/yolo-2c.cfg indicate inconsistent class numbers #1117

Closed ankitAMD closed 4 years ago

ankitAMD commented 4 years ago

The command i run in yellow marked in images.

     Parsing ./cfg/tiny-yolo.cfg
    Parsing cfg/yolo-2c.cfg
     Loading bin/tiny-yolo.weights ...
     Successfully identified 64701556 bytes
      Finished in 0.003957509994506836s
       Traceback (most recent call last):
        File "flow", line 6, in <module>
      cliHandler(sys.argv)
      File "/root/Music/Darkflow-object-detection-master/darkflow/cli.py", line 26, in cliHandler
      tfnet = TFNet(FLAGS)
      File "/root/Music/Darkflow-object-detection-master/darkflow/net/build.py", line 64, in __init__
         self.framework = create_framework(*args)
      File "/root/Music/Darkflow-object-detection-master/darkflow/net/framework.py", line 59, in create_framework
       return this(meta, FLAGS)
       File "/root/Music/Darkflow-object-detection-master/darkflow/net/framework.py", line 15, in  __init__
        self.constructor(meta, FLAGS)
      File "/root/Music/Darkflow-object-detection-master/darkflow/net/yolo/__iniblob:https://teams.microsoft.com/f3f864dd-5f9f-4350-ae78-2b9897a8445ft__.py", line 24, in constructor
### ### ).format(meta['model']
         **AssertionError: labels.txt and cfg/yolo-2c.cfg indicate inconsistent class numbers**

error error2

ankitAMD commented 4 years ago

I found the error ............the labels.txt file are not edited properly. check your labels.txt and it's must be same that number of classes are mention in cfg file.