Git Product home page Git Product logo

Comments (7)

AlvaroCavalcante avatar AlvaroCavalcante commented on May 28, 2024

@DeepakShanthaiah I already had this problem, but I thought that was fixed. This is probably happening because the proportion of the image is not the same as the XML in the generation process. To confirm this hypothesis, check your output JPG file, the generated bounding boxes are in the correct positions?

Your problem may be here:

dict_position['ymin'] = ymin * im_height

In this line of code, the bounding box position is set, but if for some reason your im_width/height is not correct, the proportion of the box will not be correct.

Please, let me know about your findings!

from auto_annotate.

DeepakShanthaiah avatar DeepakShanthaiah commented on May 28, 2024

Hello @AlvaroCavalcante ,The result folder where I get the output image in that the bounding boxes are exactly on the part. Also, the co-ordinates of the bounding boxes fits exactly when I drag that bounding box on the particular part in LabelImg tool and this is tedious task to drag and place that bounding boxes everytime for multiple class.If it gets auto annotated on the part itself if not 100% atleast 90% of that part it will help us .

I did went through that line and I am not able to figure out why is this issue.

If the bounding boxes in output jpg image is perfect then why is it generating XML file with distorted localization of annotation. I guess something is going wrong while writing XML file.

Any alternative suggestion you can help me with to tackle this ?

from auto_annotate.

DeepakShanthaiah avatar DeepakShanthaiah commented on May 28, 2024

@AlvaroCavalcante , I just tried checking the proportion of image:
In my input image : width =640 and height =480
In Xml file which is generated the width and height are same as above but the output image in result folder has width =636 and height = 482, so here is the issue I believe. What should I do to overcome this ?

from auto_annotate.

AlvaroCavalcante avatar AlvaroCavalcante commented on May 28, 2024

@DeepakShanthaiah don't worry, we'll solve your problem! Well, I've done the following test:

  • I got an online image of a leaf disease (my object detection model is trained for it) and resized with the same resolution as your image (640 x 480):
    Webp net-resizeimage
  • After that, I ran the script and got the following JPG output:
    image_1
  • I copied and pasted the generated XML file in the same folder as my original image (without detections).
  • Then I opened the LabelImage software, and clicked on "Open Dir", selecting my directory with my image and XML.
  • The result is the bounding box in the right position, as saw in the output JPG.

Important detail - please, note that your XML and JPG MUST have the same name, not only in the file but inside the tag in XML, here is my working example:

image

And inside the XML file:
image

If you have trouble with the file name, let me know, I already implemented a solution to solve this, passing the same name to the image and XML file inside generate_xlm class.

from auto_annotate.

AlvaroCavalcante avatar AlvaroCavalcante commented on May 28, 2024

@DeepakShanthaiah I've added an update on branch master to get the XML name automatically based on the JPG filename.

from auto_annotate.

DeepakShanthaiah avatar DeepakShanthaiah commented on May 28, 2024

Hello @AlvaroCavalcante , Thanks for your response . The issue is resolved and it helped me reduce my time in annotating.

from auto_annotate.

AlvaroCavalcante avatar AlvaroCavalcante commented on May 28, 2024

@DeepakShanthaiah Good news! If you have any other problems, feel free to report. I'll close this issue now.

from auto_annotate.

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.