ryouchinsa / Rectlabel-support

RectLabel is an offline image annotation tool for object detection and segmentation.
https://rectlabel.com
504 stars 73 forks source link

Pascal VOC XML Format is incomplete #211

Closed Mast3rChief closed 1 year ago

Mast3rChief commented 1 year ago

Hi,

thanks for the great app. I noticed one issue.

When I try to use the annotation via the "Pascal VOC XML" format I noticed that it is incomplete and there is no way of adding the missing tags/fields automatically.

This is what I would be expecting

<annotation>
    <folder></folder>
    <filename>000001.jpg</filename>
    <path>000001.jpg</path>
    <size>
        <width>500</width>
        <height>375</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>item</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <occluded>0</occluded>
        <bndbox>
            <xmin>179</xmin>
            <xmax>231</xmax>
            <ymin>85</ymin>
            <ymax>144</ymax>
        </bndbox>
    </object>
</annotation>

This is the actual result

<annotation>
    <filename>000001.jpg</filename>
    <size>
        <width>500</width>
        <height>375</height>
        <depth>3</depth>
    </size>
    <object>
        <name>item</name>
        <difficult>0</difficult>
        <bndbox>
            <xmin>179</xmin>
            <xmax>231</xmax>
            <ymin>85</ymin>
            <ymax>144</ymax>
        </bndbox>
    </object>
</annotation>

Especially the files <pose>Unspecified</pose>, <truncated>0</truncated> and <occluded>0</occluded> are important for me.

ryouchinsa commented 1 year ago

Thanks for writing the issue.

For example, the difficult value is used in the DOTA format. https://captain-whu.github.io/DOTA/dataset.html

x1, y1, x2, y2, x3, y3, x4, y4, category, difficult
x1, y1, x2, y2, x3, y3, x4, y4, category, difficult
...

Could you tell us in which use-case do you need those pose, truncated, and occluded values?

Mast3rChief commented 1 year ago

I'm working with the road sign data set

https://www.kaggle.com/datasets/andrewmvd/road-sign-detection

For this the additional fields are required

<annotation>
    <folder>images</folder>
    <filename>road0.png</filename>
    <size>
        <width>267</width>
        <height>400</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>trafficlight</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>0</difficult>
        <bndbox>
            <xmin>98</xmin>
            <ymin>62</ymin>
            <xmax>208</xmax>
            <ymax>232</ymax>
        </bndbox>
    </object>
</annotation>

Especially because my training pipeline requires the missing fields it takes some effort to add all missing parts.

ryouchinsa commented 1 year ago

Thanks for your detailed feedback.

We will update so that you can edit truncated, occluded, and difficult values and save them in the PASCAL VOC xml file. When the new update is released, we will let you know.

スクリーンショット 2022-12-08 19 00 37 スクリーンショット 2022-12-08 18 42 44

<annotation>
    <folder>test_all_1</folder>
    <filename>tuce-311434-unsplash2.jpg</filename>
    <size>
        <width>2313</width>
        <height>3000</height>
        <depth>3</depth>
    </size>
    <object>
        <name>sneakers-converse-yellow</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>1</difficult>
        <bndbox>
            <xmin>1096.526123</xmin>
            <ymin>389.870392</ymin>
            <xmax>1343.419312</xmax>
            <ymax>621.793030</ymax>
        </bndbox>
    </object>
</annotation>
Mast3rChief commented 1 year ago

Perfect Thanks a lot.

One thing. The <pose> filed will be available too, right? From your output it looks like it but it is not visible in the settings menu.

ryouchinsa commented 1 year ago

Thanks for your detailed feedback. It is because you can edit truncated, occluded, and difficult, but you cannot edit the pose tag. The pose tag is always saved as Unspecified. Please let us know if you need to edit the pose tag.

Mast3rChief commented 1 year ago

Sounds good. No I don’t need to edit the pose tag.

ryouchinsa commented 1 year ago

The new update version 74 was released. Please give us your feedback.

ryouchinsa commented 1 year ago

The new update version 76 was released.

スクリーンショット 2022-12-14 8 13 42

ryouchinsa commented 1 year ago

Currently If you need our support to fix this problem, please let us know. If you have any other requests, please let us know.

Mast3rChief commented 1 year ago

Works fine now. Thanks