keras-yolo2 icon indicating copy to clipboard operation
keras-yolo2 copied to clipboard

Question mAP

Open Mirorrn opened this issue 7 years ago • 12 comments

Hi, thanks for posting your code :)

I have a question about mAP. I dont understand how to compute this metric. I saw that you calc it but can´t find it in your code.

Thank you!

Mirorrn avatar Oct 19 '17 19:10 Mirorrn

I have yet to commit the evaluation code. It's very messy now. But it's coming soon.

P/S: I modify the code from https://github.com/cocodataset/cocoapi/.

experiencor avatar Oct 20 '17 13:10 experiencor

I have written my own code based on VOC evaluation. But i think my results are wrong. My mAP results for original tiny Yolo on VOC 2007 is 44 and not 57 :( Maybe because i don't sort my results for highest confidenz score at first.

Mirorrn avatar Oct 20 '17 18:10 Mirorrn

I am using this implementation for mAP https://github.com/MathGaron/mean_average_precision (at the moment is not interpolated and by default it computes the precision-recall curve in 11 points). For simplicity, instead of using it as a Keras metric I use the predict method to get predictions for some images and then update the mAP metric with evaluate. The structure is something like this:

yolo = YOLO(...)  # Create model
yolo.load_weights(weights_path)  # Load weights
mAP = DetectionMAP(num_classes)  # Initialise metric
for image in images:
    boxes = yolo.predict(image)
    # prepare objects pred_bb, pred_classes, pred_conf, gt_bb and gt_classes
    mAP.evaluate(pred_bb, pred_classes, pred_conf, gt_bb, gt_classes)  # Update the metric

mAP.plot()  # Get the value of the metric and precision-recall plot for each class

It seems it's working fine so it might be helpful for somebody. BTW, @experiencor thanks for the Yolo implementation :)

alessandro-montanari avatar Nov 27 '17 16:11 alessandro-montanari

Sir I have been trained it after 3 ephocs it gives me error as killed and loss not yet decreased.how would I fix these in code "after 3 ephocs it killed", but I want it doesn't kill after 3 ephocs.

sivanagendra123 avatar Oct 05 '18 07:10 sivanagendra123

Hi! sir nice contribute,

I have a question: ther train.py go 8 hours in maximun CVPU and memory, is it normal?

I wait your kind feedback. Captura de pantalla de 2019-04-06 09-52-39

Captura de pantalla de 2019-04-06 02-13-51

chris2009 avatar Apr 06 '19 14:04 chris2009

is this normal? the training scale is 15 hours left and my 1 epoch is steel like this i cant understand why? Ekran Görüntüsü (27)

somebody can help me?

mrannadinc avatar May 27 '19 14:05 mrannadinc

I have yet to commit the evaluation code. It's very messy now. But it's coming soon.

P/S: I modify the code from https://github.com/cocodataset/cocoapi/.

Hi, Did you commit the evaluation code?

isennkubilay avatar Oct 09 '19 08:10 isennkubilay

I am using this implementation for mAP https://github.com/MathGaron/mean_average_precision (at the moment is not interpolated and by default it computes the precision-recall curve in 11 points). For simplicity, instead of using it as a Keras metric I use the predict method to get predictions for some images and then update the mAP metric with evaluate. The structure is something like this:

yolo = YOLO(...)  # Create model
yolo.load_weights(weights_path)  # Load weights
mAP = DetectionMAP(num_classes)  # Initialise metric
for image in images:
    boxes = yolo.predict(image)
    # prepare objects pred_bb, pred_classes, pred_conf, gt_bb and gt_classes
    mAP.evaluate(pred_bb, pred_classes, pred_conf, gt_bb, gt_classes)  # Update the metric

mAP.plot()  # Get the value of the metric and precision-recall plot for each class

It seems it's working fine so it might be helpful for somebody. BTW, @experiencor thanks for the Yolo implementation :)

@alessandro-montanari can you help me to calculate mAP using that repo? i do not understand it . Can you explain me which files i need to prepare to run? i have trained keras_yolo2 model using thsi repo. now i want to calculate mAP using this model. which other files i need and how to run the other repo for mAP? Can you provide your email address?

MuhammadAsadJaved avatar Oct 12 '19 01:10 MuhammadAsadJaved

@mrannadinc yes that is normal! work with training parameters; learning rate etc.

schliffen avatar Nov 22 '19 09:11 schliffen

Did anyone tried squeezenet? I trained squeezenet, the training went fine, in converged and loss dropped to 0.01, but when I trying to test it, nothing is detected. Did anyone experience this? Q2: what would be the input size for squeezenet? 224 or 416 or sthing else?

--thankyou

schliffen avatar Nov 22 '19 09:11 schliffen

Hello,

I trained yolov2 using all explanations with 12 classes but it is detecting only 8 classes but not all 12. Can anyone please help me with increasing the accuracy of the yolov2 model.

Hoping for the reply as soon as possible.

TIA

kishoremohit avatar Apr 02 '20 10:04 kishoremohit

The rest of the classes may have few training objects in the images. Just train for some more iterations.

On Thu, Apr 2, 2020 at 6:29 PM Kishore Mohit [email protected] wrote:

Hello,

I trained yolov2 using all explanations with 12 classes but it is detecting only 8 classes but not all 12. Can anyone please help me with increasing the accuracy of the yolov2 model.

Hoping for the reply as soon as possible.

TIA

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/experiencor/keras-yolo2/issues/27#issuecomment-607761244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4GR5E6UOA47IIJPWCEBNTRKRSKNANCNFSM4D764XJA .

MuhammadAsadJaved avatar Apr 02 '20 13:04 MuhammadAsadJaved