question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No default attributes in dumped annotation

See original GitHub issue

Hello, I have a little problem after dump annotation. But first… My labels look this like:

Label_1 @number=Shelf_ID:1,10,1 @checkbox=Face:true @number=Order_on_shelf:1,50,1 Label_2 @number=Shelf_ID:1,10,1 @checkbox=Face:true @number=Order_on_shelf:1,50,1 Label_3 @number=Shelf_ID:1,10,1 @checkbox=Face:true @number=Order_on_shelf:1,50,1 Label_4 @number=Shelf_ID:1,10,1 @checkbox=Face:true @number=Order_on_shelf:1,50,1 Label_5 @number=Shelf_ID:1,10,1 @checkbox=Face:true @number=Order_on_shelf:1,50,1

On annotated photo we see a rack in the shop with few shelfs. We use attributes to count on which shelf and on which place on shelf is annotated product. Of course on every photo we don’t need to change attributes for only one product (this product which have posistion on first shelf and on the first position on shelf) so it means that default attributes are good for him.

And here we have a problem because if we won’t do anything with any attribute on this instance of label, after dump annotation, in xml file we can see only his name but with no values of attributes like below:

<box label="Label_1" occluded="0" xtl="308.15" ytl="1436.57" xbr="536.26" ybr="1707.47">
      <attribute name="Order_on_shelf">2</attribute>
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">false</attribute>
    </box>
    <box label="Label_2" occluded="0" xtl="3.26" ytl="1410.68" xbr="119.15" ybr="1680.02">
    </box>
    <box label="Label_3" occluded="0" xtl="527.86" ytl="1492.75" xbr="760.65" ybr="1722.92">
      <attribute name="Order_on_shelf">3</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Shelf_ID">1</attribute>
    </box>

When I will change any attribute on this instance for example:

  1. Shelf_ID=1 —> ShelfId=2
  2. Save work
  3. Shelf_ID=2 —> Shelft_ID=1
  4. Save work.

Then everything is OK, instance was “touched” so we can see his default values, but only because I changed them for a moment. After dump anotation we see now correct values.:

<box label="Label_1" occluded="0" xtl="308.15" ytl="1436.57" xbr="536.26" ybr="1707.47">
      <attribute name="Order_on_shelf">2</attribute>
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">false</attribute>
    </box>
    <box label="Label_2" occluded="0" xtl="3.26" ytl="1410.68" xbr="119.15" ybr="1680.02">
      <attribute name="Order_on_shelf">1</attribute>
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
    </box>
    <box label="Label_3" occluded="0" xtl="527.86" ytl="1492.75" xbr="760.65" ybr="1722.92">
      <attribute name="Order_on_shelf">3</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Shelf_ID">1</attribute>
    </box>

EDIT: Or maybe this is normal funcionality in CVAT, which means that no changes on default values of attributes aren’t copied on every line of unchanged instance of objects.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
azhavorocommented, Jul 31, 2019

@sbanori Got it, thanks for help! We’ll fix this issue.

0reactions
sbanoricommented, Jul 31, 2019

I know why wee see another effects 😃 But first, here is json from your steps:

{
  "version": 5,
  "shapes": [
    {
      "attributes": [
        {
          "value": "1",
          "spec_id": 399
        },
        {
          "value": "true",
          "spec_id": 400
        },
        {
          "value": "1",
          "spec_id": 401
        }
      ],
      "label_id": 3441,
      "group": 0,
      "frame": 0,
      "type": "rectangle",
      "occluded": false,
      "z_order": 1,
      "points": [
        333.80078125,
        1746.416015625,
        566.4331359863281,
        1996.9431610107422
      ]
    }
  ],
  "tracks": [],
  "tags": []
}

And it work properly when I did it like you said. Default attributes are in the xml file and it works without bug.

I made some tests and know I see when is this bug. It’s when I use AutoAnnotation. When I write boundingbox by my hand, with default attributes, it’s OK. Xml will show these attributes. But when I use AutoAnnotation, then untouched default attributes aren’t visible in Xml files.

And here we have a file which is annotataed in both ways in one task. These without attributes, are from AutoAnnotation, and these from handAnnotation ale with attributes:

 <image id="0" name="A65_00.jpg" width="2448" height="3264">
    <box label="Label_4" occluded="0" xtl="309.72" ytl="1389.80" xbr="499.20" ybr="1606.56">
    </box>
    <box label="Label_3" occluded="0" xtl="7.12" ytl="1388.27" xbr="158.04" ybr="1598.04">
    </box>
    <box label="Label_1" occluded="0" xtl="412.98" ytl="1033.03" xbr="616.50" ybr="1212.46">
    </box>
    <box label="Label_1" occluded="0" xtl="236.77" ytl="1006.49" xbr="440.74" ybr="1216.72">
    </box>
    <box label="Label_1" occluded="0" xtl="194.46" ytl="210.67" xbr="415.19" ybr="463.48">
    </box>
    <box label="Label_1" occluded="0" xtl="445.06" ytl="201.70" xbr="613.23" ybr="449.56">
    </box>
    <box label="Label_1" occluded="0" xtl="229.17" ytl="552.18" xbr="419.61" ybr="799.78">
    </box>
    <box label="Label_1" occluded="0" xtl="408.63" ytl="550.74" xbr="606.38" ybr="798.35">
    </box>
    <box label="Label_2" occluded="0" xtl="98.93" ytl="963.27" xbr="259.68" ybr="1192.88">
    </box>
    <box label="Label_2" occluded="0" xtl="30.80" ytl="195.85" xbr="228.04" ybr="462.64">
    </box>
    <box label="Label_2" occluded="0" xtl="7.48" ytl="547.47" xbr="228.95" ybr="808.97">
    </box>
    <box label="Label_5" occluded="0" xtl="383.55" ytl="2605.37" xbr="473.38" ybr="2841.58">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_4" occluded="0" xtl="888.18" ytl="2594.63" xbr="1156.96" ybr="2812.95">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_3" occluded="0" xtl="1711.34" ytl="2752.10" xbr="1919.28" ybr="2909.58">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_2" occluded="0" xtl="2173.03" ytl="2222.42" xbr="2391.70" ybr="2548.10">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_2" occluded="0" xtl="2015.91" ytl="1692.73" xbr="2230.65" ybr="1921.78">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="1632.96" ytl="568.94" xbr="1790.44" ybr="840.94">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="1156.96" ytl="1012.73" xbr="1364.54" ybr="1238.20">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="1096.12" ytl="1388.52" xbr="1296.54" ybr="1606.84">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="1074.64" ytl="2068.52" xbr="1264.33" ybr="2329.79">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="226.43" ytl="2057.79" xbr="401.80" ybr="2336.94">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
    <box label="Label_1" occluded="0" xtl="330.22" ytl="1363.47" xbr="512.75" ybr="1621.15">
      <attribute name="Shelf_ID">1</attribute>
      <attribute name="Face">true</attribute>
      <attribute name="Order_on_shelf">1</attribute>
    </box>
  </image>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring @Value annotated method, use default value when ...
I am injecting properties from .properties file into fields annotated with @Value. However this properties present sensitive credentials, so I ...
Read more >
Type Errors - Pyre
Any , or is not annotated with any type at all (in which case Pyre will treat it as typing.Any by default). It...
Read more >
Immutable objects
To declare a default attribute value, create a non-abstract attribute initializer method and annotate it with org.immutables.value.Value.Default . If the value ...
Read more >
NiFi Developer's Guide - Apache NiFi
While these attributes are not members of the CoreAttributes enum, they are de facto standards across the system and found on most FlowFiles....
Read more >
Configuring a Step - Spring
The id attribute is still required on the step within the job element. ... exceptions thrown from the ItemReader do not cause a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found