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

Tile Images and Annotations for large images #36

Open
davodogster opened this issue Oct 8, 2020 · 8 comments
Open

Tile Images and Annotations for large images #36

davodogster opened this issue Oct 8, 2020 · 8 comments
Assignees
Labels
ENHANCE Enhancement of existing features good first issue Good for newcomers

Comments

@davodogster
Copy link

A common problem for researchers is having large images with lots of small objects. Is there a function in datumaro to tile images (overlapping option possible, min_visibility option possible) into specified dimensions and the corresponding masks, bounding boxes, and polygons also get tiled, with images renamed with their original coordinates. If not, then it would be great to have this functionality.

Cheers, Sam

@zhiltsov-max
Copy link
Contributor

Hi, there is no such function yet, but it is an interesting feature request. If you have an opportunity, you can try to implement it yourself - it would be a Transform, and it does not look like something very complex to implement. How do you think images should be tiled - is it some even split, or a cut of a specified size?

@zhiltsov-max zhiltsov-max added ENHANCE Enhancement of existing features good first issue Good for newcomers labels Oct 8, 2020
@davodogster
Copy link
Author

davodogster commented Oct 8, 2020

Hi, there is no such function yet, but it is an interesting feature request. If you have an opportunity, you can try to implement it yourself - it would be a Transform, and it does not look like something very complex to implement. How do you think images should be tiled - is it some even split, or a cut of a specified size?

@zhiltsov-max Hi, I think that the user should have control over how they want the tiling/slicing to be done, so they can either chose (n_rows, n_columns) or (tile height, width), with an overlap size of 0 to 500+. Once the tiling of images and all annotations are performed then the function outputs a newly annotated dataset.

@nmanovic
Copy link

nmanovic commented Oct 9, 2020

@davodogster , @zhiltsov-max , you can find a nice discussion of the problem here: cvat-ai/cvat#531. I think that Datumaro should not tile an image (at least as next step). At the same time it should be able to work with such images (e.g. extract crops with objects, import/export datasets with big images, etc). Let's keep the issue in backlog.

@davodogster
Copy link
Author

@nmanovic cvat#531 No my problem isn't loading large images into cvat. The problem is that it would be nice to tile the images and corresponding annotations after they have been annotated to increase the size of the dataset to split into train/val/test, and it also means that image resolution can be preserved so we can train on the full resolution after tiling and don't need to downsample the resolution.

@collinrpower
Copy link

@davodogster I have run into the same problem. Have you been able to figure it out?

@michaelSkaro
Copy link

I also have the same problem. Is there an implementation?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Mar 5, 2022

@michaelSkaro, not yet. Probably, we need better understanding about how this feature should be designed. If possible, could you tell us more about your use case and possible solutions you see?

@mmoollllee
Copy link

mmoollllee commented Sep 7, 2023

I'd love to see a functionality like this in CVAT: https://github.com/nagi1995/yolo-tiling/blob/main/tile_yolo.py

I have a dataset with highres images with few small objects. I want to tile every image to get rid of the image parts without bounding boxes but keep the original files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCE Enhancement of existing features good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants