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

Brush and Polygon Segmentation Loading Time #476

Closed
anshul-dt opened this issue Oct 29, 2020 · 12 comments
Closed

Brush and Polygon Segmentation Loading Time #476

anshul-dt opened this issue Oct 29, 2020 · 12 comments
Assignees
Labels
images Image annotation cases often asked performance Performance & high load-related issues problem bug or something isn't working

Comments

@anshul-dt
Copy link

Describe the bug
After Labeling Brush and Polygon, the loading time in tasks is huge, could take upto minutes sometimes.

To Reproduce
Steps to reproduce the behavior:

  1. Label an image with Polygon or Brush segmentation, submit
  2. Go to Tasks and try to load the image
  3. You will observe that it takes a huge time to load (2-3 minutes sometimes)

Expected behavior
Should Load quickly

Environment (please complete the following information):

  • OS: Linux Ubuntu 18.04
  • Browser: Chrome, Firefox, Safari
@anshul-dt anshul-dt added the problem bug or something isn't working label Oct 29, 2020
@makseq
Copy link
Member

makseq commented Oct 29, 2020

@anshul-dt What storage do you use? Is it s3, gcs or local?

@anshul-dt
Copy link
Author

local

@makseq
Copy link
Member

makseq commented Oct 29, 2020

What LS version do you use?

@anshul-dt
Copy link
Author

0.7 and 0.8

@makseq
Copy link
Member

makseq commented Oct 29, 2020

I've checked it here: https://app.labelstud.io/api/project-switch?uuid=83ce5d2f-61b3-4409-ac30-863ae7f0d741
And polygons work fast enough. Brushes can be not too fast if there are a lot of strokes (RLE is a heavy format).
I think it will be easier to find the problem if you record video.

@tristanratz
Copy link

I had the same problem. Only thing that worked for me was downsampling the photos to a smaller shape

@makseq
Copy link
Member

makseq commented Jan 13, 2021

@tristanratz What image sizes do you have?

@tristanratz
Copy link

My images are sized 700px on the x-axis and dynamically on the y axis (according to the ratio)

@hlomzik
Copy link
Collaborator

hlomzik commented Jan 18, 2021

Hi! That's sad, but currently brushes are not optimized, so their speed and size are badly depend on the image size (more specifically, number of pixels). So if it's possible to downsample your images, that's a good temporary solution.
I'm working on optimization, which increase speed significantly, will be released soon.
Sorry for inconvenience.

@iakremnev
Copy link

Hi, I've recorded some footage of this problem. I noticed following issues:

  1. Brush annotated tasks take 10-15 seconds to load for 1920x1080 images. Even the project page loading is slow.
  2. Browser consumes much of the memory, not the backend. And it easily takes ~6 Gib, which is too much for a dataset of 17 images.
  3. Single CPU is used for forming and parsing RLEs. I understand this format is essentially sequential, but at least could be implemented in a separate process so that browser doesn't consume all the resources waiting for the encoding.
output2.mp4

@niklub niklub added this to the Label Studio 1.3 milestone Aug 14, 2021
@smoreface
Copy link
Contributor

This should be fixed with version 1.3.0 release, please try it out!

@makseq makseq added often asked images Image annotation cases bounding boxes Image Object Detection with Bounding Boxes annotation scenario performance Performance & high load-related issues and removed bounding boxes Image Object Detection with Bounding Boxes annotation scenario labels Oct 5, 2021
@makseq makseq closed this as completed Jan 29, 2022
@vchaparro
Copy link

vchaparro commented Apr 12, 2023

Hi,

I'm using version 1.7.2, and it seems that the issue has not been resolved. I am using images of approximately 1500x1500 (around 5 MB) with segmentation polygons. When attempting to open these pre-labeled images, which have a relatively high number of polygons per image (it's about buildings footprint segmentation), it takes too long to open. Additionally, the user experience suffers when transitioning from one image to the next, zooming, and so on. The client-side web browser begins to consume high CPU resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
images Image annotation cases often asked performance Performance & high load-related issues problem bug or something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants