keras-yolo2
keras-yolo2 copied to clipboard
Question mAP
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!
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/.
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.
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 :)
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.
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.
is this normal? the training scale is 15 hours left and my 1 epoch is steel like this i cant understand why?
somebody can help me?
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?
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 withevaluate
. 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?
@mrannadinc yes that is normal! work with training parameters; learning rate etc.
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
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
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 .