AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.8k stars 7.97k forks source link

Segmentation fault (core dumped) during detector map command #2810

Closed angeligareta closed 5 years ago

angeligareta commented 5 years ago

Hi everyone,

I have trained a custom model of 8 classes from the sl-yolov3-spp.cfg. Once I had the resulting weights, I wanted to test the mAP of the training. However, when I write the command:

./darknet detector map my_file.data sl-yolov3-spp.cfg sl-yolov3-spp_9000.weights

I get the following output:

compute_capability = 610, cudnn_half = 0 layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF ... 113 yolo Total BFLOPS 66.242 Allocate additional workspace_size = 52.43 MB Loading weights from weights/weights-gtsdb/sl-yolov3-spp_9000.weights... seen 64 Done! calculation mAP (mean average precision)... 104 detections_count = 336, unique_truth_count = 116
class_id = 0, name = 20, ap = 0.00% (TP = 0, FP = 0) class_id = 1, name = 30, ap = 0.00% (TP = 0, FP = 0) class_id = 2, name = 50, ap = 18.12% (TP = 4, FP = 2) class_id = 3, name = 60, ap = 3.97% (TP = 0, FP = 5) class_id = 4, name = 70, ap = 4.33% (TP = 1, FP = 21) class_id = 5, name = 80, ap = 4.85% (TP = 2, FP = 13) class_id = 6, name = 100, ap = 0.92% (TP = 0, FP = 6) class_id = 7, name = 120, ap = 0.00% (TP = 0, FP = 4) class_id = 8, name = , ap = 0.00% (TP = 0, FP = 0) ./test_gtsdb.sh: line 1: 6965 Segmentation fault (core dumped) ./darknet detector map cfg/gtsdb/gtsdb.data cfg/gtsdb/sl-yolov3-spp-test.cfg weights/weights-gtsdb/sl-yolov3-spp_9000.weights

I am using Ubuntu 18.04 with GPU GTX1060 and In my Makefile I have the flags:

Can anyone give me a solution? If it helps it happends to when I use detector train ... -map

angeligareta commented 5 years ago

The error was that the classes from the cfg were different from the classes I wanted to train!