GithubHelp home page GithubHelp logo

Comments (7)

prabindh avatar prabindh commented on July 28, 2024

Could you please share the voc_eval.py, so I can check for euclid https://github.com/prabindh/euclid ?

from darknet.

SumanthReddyKaliki avatar SumanthReddyKaliki commented on July 28, 2024

After running ./ darknet detector
on my test set it generates text files for each class in the Pascal VOC format. Check the below example

Image_01389 0.925365 2.702499 139.048599 416.000000 408.688477
Image_01562 0.800577 2.937439 50.000034 144.580612 175.984833
Image_01562 0.007224 17.548409 16.466003 154.005432 340.751160
Image_01562 0.921113 52.459122 28.805679 416.000000 386.246338

Now, I need to use this generated text along with ground truth annotations, to calculate the mAP using
voc_eval.py

Or by using any other standard tool. But for that to happen, the ground truth annotations should be in VOC format. Either I need to convert my annotations to VOC format or create new script to calculate mAP from yolo format

from darknet.

SumanthReddyKaliki avatar SumanthReddyKaliki commented on July 28, 2024

We can also calculate mAP using VOC Devkit

from darknet.

SumanthReddyKaliki avatar SumanthReddyKaliki commented on July 28, 2024

Any idea on this problem

from darknet.

prabindh avatar prabindh commented on July 28, 2024

It should be fairly easy to convert the annotation to another format using Python. Given the equation to convert between the two. Do you have the equation handy ?

from darknet.

SumanthReddyKaliki avatar SumanthReddyKaliki commented on July 28, 2024

Yolo
<class> <centerX/imageWidth> <centerY/imageHeight> <bboxWidth/imageWidth> <bboxHeight/imageHeight> (We'll index this from 0-4)

And for VOC, the format is
Voc
<class> <bboxXMin> <bboxYMin> <bboxXMax> <bboxYMax> (Index this 0-4)

bboxWidth = yolo[3] * imageWidth
bboxHeight = yolo[4] * imageHeight
centerX = yolo[1] * imageWidth
centerY = yolo[2] * imageHeight

voc[1] = centerX - (bboxWidth/2)
voc[2] = centerY - (bboxHeight/2)
voc[3] = centerX + (bboxWidth/2)
voc[4] = centerY + (bboxHeight/2)
Yolo label example

A .xml file is to be created to each text file. I can't upload .xml so I uploaded as a text file. You can ignore the action, pose and difficulty stuff, shown in below example. only name i.e class name and bbox are to be stored

VOC.txt

from darknet.

SumanthReddyKaliki avatar SumanthReddyKaliki commented on July 28, 2024

How did you calculate mAP in yolo on your dataset, I asking this out of curiosity, because I have seen many post in Darknet google groups asking how to calculate mAP. And many people doesn't know how to do so. If you have calculated, please share it in the groups

from darknet.

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.