Giter VIP home page Giter VIP logo

Comments (8)

Firyuza avatar Firyuza commented on August 15, 2024

I've investigated YAD2K and didn't find calculations for mAP. But you can write down code for mAP in test_yolo.py. I tried this one but mAP is too low, I think I made mistake. Briefly, you have to take score threshold and check if score for that lable is bigger than your threshold you can check IOU and then define is it True Positive or False Positve. Also if there is no bounding box for ground truth label - it should be False Negative. Have to increment score threshold, so do this calculations in loop while Recall begins zero. Then for every class you have Precision and Recall values ( different values for corresponding score thresholds) use it to calculate average precision(https://sanchom.wordpress.com/tag/average-precision/). And after that summarize average precision and divide it by number of classes.

from yad2k.

Firyuza avatar Firyuza commented on August 15, 2024

It will be better to do it using tensorflow. But you can do this just using python, not pretty solution, but quick.

from yad2k.

Firyuza avatar Firyuza commented on August 15, 2024

https://github.com/allanzelener/YAD2K/issues/40
There you can find answer.

from yad2k.

Pankajchandan avatar Pankajchandan commented on August 15, 2024

thanx,
i am working on f1 score will share once i test it

from yad2k.

christopher5106 avatar christopher5106 commented on August 15, 2024

do you have any news about the map score you get? thx

from yad2k.

Pankajchandan avatar Pankajchandan commented on August 15, 2024

https://github.com/Pankajchandan/My-Machine-Learning-Rep/blob/master/f1_score.ipynb

this is an implementation for calculating F1 score for multiclass object detection. This can be extended for Map without much hassle.

from yad2k.

Firyuza avatar Firyuza commented on August 15, 2024

@Pankajchandan Did you tested on yad2k? If yes, which accuracy did you get?

from yad2k.

Pankajchandan avatar Pankajchandan commented on August 15, 2024

@Firyuza no i have not done that yet. This can be done by calling pred_info(y_true, y_pred) for every image/frame in yad2k. Here y_true is the ground truth in the default format used by yad2k i.e. "class_num x_min y_min x_max y_max" and y_pred is the prediction for that frame/image in the same format. Calling pred_info each time will return a dataframe having classes as indices and "count", "fp", "fn", "tp" and "dnd as columns, You need to keep adding this result somewhere in your code. When all the predictions in you test set are done, you just need to call cal_f1(pred_info) just once to get a data frame having all the classes as indices and "precision", "recall" and "f1 score" as the columns. Here the argument pred_info in cal_f1 is the result of the addition of all the results from the function pred_info.

from yad2k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.