Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23247

AssertionError: Label class 15 exceeds nc=1 in data/coco128.yaml. Possible class labels are 0-0

$
0
0

I've been building the yolov5 environment and trying to run it for the last few days. I used the following code to test whether My setup was successful.

python train.py --img 640 --data data/coco128.yaml --cfg models/yolov5s.yaml --weights weights/yolov5s.pt --batch-size 16 --epochs 100

And then it gave me the following error, and I tried to find answers on Google, but I didn't see anything useful. I'm devastated right now. Can someone give me a hand? I really appreciate it.

Transferred 362/370 items from weights/yolov5s.ptOptimizer groups: 62 .bias, 70 conv.weight, 59 otherScanning labels data\coco128\labels\train2017.cache (32 found, 0 missing, 0 empty, 0 duplicate, for 32 images): 32it [00:00, 3270.57it/s]Traceback (most recent call last):  File "train.py", line 456, in <module>    train(hyp, opt, device, tb_writer)  File "train.py", line 172, in train    assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Possible class labels are 0-%g' % (mlc, nc, opt.data, nc - 1)AssertionError: Label class 15 exceeds nc=1 in data/coco128.yaml. Possible class labels are 0-0

I really don't use this site. Forgive me.

attached image


Viewing all articles
Browse latest Browse all 23247

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>