Code Monkey home page Code Monkey logo

Comments (8)

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024 3

Dear @Mshz2 ,

I noticed that your ground-truth files (XML) name the objects class as "pore" (<name>pore</name>), and your detection files identify the object classes as "0" (all your detection files start with "0"). So, the problem is because the "0" could either be the id or the name of the class.

First thing you have to do is: separate your files into 3 different folders: groundtruths (XML files), detections (.txt files) and images.

Then, please, update your code with the fixes I have just made. The error messages were not telling you the error correctly. I fixed it.

Now you have two choices. The first one is the easiest one :)


1st option:
Make a txt file as this one
class.txt

As you can see, in its first line (line 0) I put the name of your object ("spore"). This way the program will know that your detection files are representing the class "0" with the name in the line 0 of the file ("spore").

Set the interface with the following options:
Ground truth:
Annotations: Choose the directory where your (.xml) files are.
Images (optional): Choose the directory where your images are.
Coordinate type: Pick the option "PASCAL VOC (.xml)
Output: Choose a directory where the outputs will be saved.

Detections:
Annotations: Choose the directory where your detections (.txt) files are.
Classes: Point to the class.txt file.
Coordinate type: Pick the option <class_id> <confidence> <left> <top> <right> <bottom> (ABSOLUTE)
Output: Choose a directory where the outputs will be saved.


2nd option:
Change all detection (.txt) files replacing the first element "0" by "pore".
Example:
Now you have: 0 0.99 37 143 98 206
Change it to: pore 0.99 37 143 98 206

Set the interface with the following options:
Ground truth:
Annotations: Choose the directory where your (.xml) files are.
Images: (optional) Choose the directory where your images are.
Coordinate type: Pick the option "PASCAL VOC (.xml)

Detections:
Annotations: Choose the directory where your (.txt) files are.
Classes: Leave it blank, because you now included the name of the classes in your detection files.
Coordinate type: Pick the option <class_name> <confidence> <left> <top> <right> <bottom> (ABSOLUTE)
Output: Choose a directory where the outputs will be saved.


In both cases, if you inserted the directory with the images, you can visualize your bounding boxes in the statistics.

I hope it helps.

Best regards

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024 1

@Mshz2
This is strange. With the files you provided, I obtain different results:

image

Have you updated the repository? I updated it with few changes.

You dont have to show them here, but if you click on "show detections statistics", are you able to see the images with the bounding boxes?

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024 1

Great! :)
I will close this issue now. If you have any other problem, just open another issue or reach me at linkedin.
Best regards.

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024

Hi @Mshz2 ,

Could you please, zip a couple images, detections and ground-truths and attach here, so I can try to replicate this problem?

Thank you

from review_object_detection_metrics.

Mshz2 avatar Mshz2 commented on May 30, 2024

Hi @Mshz2 ,

Could you please, zip a couple images, detections and ground-truths and attach here, so I can try to replicate this problem?

Thank you

Thanks a lot.
test.zip
btw sorry, I had to delete images and give just a blank white frame as I am not allowed to share images. But thanks for the support, I hope this would be usefull.

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024

@Mshz2

No problem you had to delete the images. I totally understand it. :)

I hope the instructions in the previous message helps you. Let me know if you got it working.

from review_object_detection_metrics.

Mshz2 avatar Mshz2 commented on May 30, 2024

@rafaelpadilla thanks aloooot for your effort.
I did as you said but unfortunately I get everything 0. :(
eval

from review_object_detection_metrics.

Mshz2 avatar Mshz2 commented on May 30, 2024

@rafaelpadilla forget above message :) seems like when I did as second option it worked!
In first option it gave everything 0

eval2

from review_object_detection_metrics.

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.