Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to put my object detection dataset in this specific COCO annotation format? #533

Closed
allansdefreitas opened this issue Jul 3, 2022 · 12 comments

Comments

@allansdefreitas
Copy link

Hello,

I'm running this Keras implementation of retinanet and it works perfectly on COCO dataset obtained from tfds.load().

I noticed that the downloaded TFrecords (from tfds.load() ) contain COCO annotations in a different way from traditional COCO annotations and that is the cause of all problems.

The COCO annotation format, creates one annotation element for each element in image, whereas Tensorflow COCO format (obtained from tfds), crates one single annotation for each image and inside this annotation, there is a list of objects and their positions (bboxes) That is the main difference.

Comparing annotations format

Is there a way to put my dataset in this Tensorflow COCO format?

Thanks in advance,
Allan Freitas

System informations:
Ubuntu
Tensorflow: 2.9.1
Python: 3.7.13

@tilakrayal
Copy link
Collaborator

@allansdefreitas,
To expedite the trouble-shooting process, could you please provide the complete code to reproduce the issue reported here or the error log. It helps to debug the issue. Thank you!

@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.

@allansdefreitas
Copy link
Author

Let me prepare and send to you...

@allansdefreitas
Copy link
Author

allansdefreitas commented Jul 14, 2022

@allansdefreitas, To expedite the trouble-shooting process, could you please provide the complete code to reproduce the issue reported here or the error log. It helps to debug the issue. Thank you!

@tilakrayal here you can find the notebook: https://github.com/allansdefreitas/Deep-Learning-Experiments/blob/master/retinanet_coco_error.ipynb

I do not know how to put my dataset in the tfds.load TFRecord internal format

@tilakrayal
Copy link
Collaborator

@allansdefreitas,
I was facing different error while trying to execute the given code. Kindly find the gist of it here. Thank you!

@allansdefreitas
Copy link
Author

@allansdefreitas, I was facing different error while trying to execute the given code. Kindly find the gist of it here. Thank you!

It seems like if the content of TFRecords is encoded..

@tilakrayal
Copy link
Collaborator

@allansdefreitas,
Could you please provide the TFRecord to debug the issue. Thank you!

@allansdefreitas
Copy link
Author

@allansdefreitas, Could you please provide the TFRecord to debug the issue. Thank you!

Hi, @tilakrayal.

You can download the TFRecords, running via terminal: curl -L "https://app.roboflow.com/ds/XqoiwGXC8L?key=NyDE34g8vI" > roboflow.zip; unzip roboflow.zip; rm roboflow.zip

@tilakrayal
Copy link
Collaborator

@allansdefreitas,
After uploading the tfrecord, I tried to execute the code and faced the same issue. Kindly find the gist here and please try to define the test_dataset . Thank you!

@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@fchollet fchollet transferred this issue from keras-team/keras Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants