joheras / CLoDSA

124 stars 32 forks source link

Can't parse 'pt1' / 'rec' Error - COCO Detection #74

Closed Natriumpikant closed 2 years ago

Natriumpikant commented 2 years ago

Hello,

I try to edit a COCO Detection-Dataset with CLoDSA.

If i run the following notebook, it works very well: https://colab.research.google.com/github/joheras/CLoDSA/blob/master/notebooks/CLODSA_COCO_Detection.ipynb

If i run the same code with my data, i get the following error ( on gc and also local ):

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

I compared "shapes2" annotations with my own and it seems to be nearly the same structure.

As example this is one file of my annotations.json: https://pastebin.com/XZMvAG6L

You have an idea what the problem is here? Thank for an advise

joheras commented 2 years ago

Hi,

Could you send me the four images used in the annotations.json file to check what is wrong?

Best, Jónathan

El vie, 30 sept 2022 a las 15:45, MSchanze @.***>) escribió:

Hello,

I try to edit a COCO Detection-Dataset with clodsa.

If i run the following notebook, it works very well:

https://colab.research.google.com/github/joheras/CLoDSA/blob/master/notebooks/CLODSA_COCO_Detection.ipynb http://url

If i run the same code with my data, i get the following error ( on gc and also local ):

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

I compared "shapes2" annotations with my own and it seems to be nearly the same structure.

As example this is one file of my annotations.json: https://pastebin.com/9eV3zD9B http://url

You have an idea what the problem is here? Thank for an advise

— Reply to this email directly, view it on GitHub https://github.com/joheras/CLoDSA/issues/74, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRAG25YPJWUJYBENMSNE3WA3VJPANCNFSM6AAAAAAQZZKK3U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Natriumpikant commented 2 years ago

Hi, Could you send me the four images used in the annotations.json file to check what is wrong? Best, Jónathan El vie, 30 sept 2022 a las 15:45, MSchanze @.***>) escribió:

Good morning,

Thanks for your support.

Following the dataset i have used with 5 pictures: Done

Regards

joheras commented 2 years ago

Hi,

The problem is related to the annotation since the element of bbox should be integers instead of floats:

Instead of "bbox": [ 837.67, 122.48, 135.73, 221.82 ],

It should be "bbox": [ 837, 122, 135, 221 ],

I am preparing a new version of Clodsa to deal with that problem, but in the meantime that is the solution.

Best, Jónathan

El lun, 3 oct 2022 a las 8:45, MSchanze @.***>) escribió:

Hi, Could you send me the four images used in the annotations.json file to check what is wrong? Best, Jónathan El vie, 30 sept 2022 a las 15:45, MSchanze @.***>) escribió: … <#m_-2711654935273984009m-7035914035791892045_>

Good morning,

Thanks for your support.

Following the dataset i have used with 5 pictures:

https://drive.google.com/file/d/1vpSPfMLocxoYNa8OHCknAmKT-NbOjjo8/view?usp=sharing

Regards

— Reply to this email directly, view it on GitHub https://github.com/joheras/CLoDSA/issues/74#issuecomment-1265003600, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRAGZI5GNX55IIZEACWQLWBJ6JTANCNFSM6AAAAAAQZZKK3U . You are receiving this because you commented.Message ID: @.***>

Natriumpikant commented 2 years ago

Hi, The problem is related to the annotation since the element of bbox should be integers instead of floats: Instead of "bbox": [ 837.67, 122.48, 135.73, 221.82 ], It should be "bbox": [ 837, 122, 135, 221 ], I am preparing a new version of Clodsa to deal with that problem, but in the meantime that is the solution. Best, Jónathan El lun, 3 oct 2022 a las 8:45, MSchanze @.***>)

Thank you!