cvat icon indicating copy to clipboard operation
cvat copied to clipboard

Support of images with huge width and height

Open tingfengwanxiao opened this issue 4 years ago • 14 comments

Hello,I submit a bmp file to cvat with the size of 18000*14000 and I got the error

Could not create the task Error: Could not create the task on the server. PIL.Image.DecompressionBombError: Image size (256901120 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack..

I also try to add the demo of Image.MAX_IMAGE_PIXELS = None behind all demo of from PIL import Image because I can't find it in cvat\apps\engine\task.py,but I got annother error

Could not create the task Error: Work-horse process was terminated unexpectedly (waitpid returned 9).

is three another method?

tingfengwanxiao avatar Sep 21 '20 13:09 tingfengwanxiao

Hi, I generated white empty image in Pillow with such the size and was able to create a task after adding

from PIL import Image
Image.MAX_IMAGE_PIXELS = None

to cvat/settings/base.py

bsekachev avatar Sep 21 '20 14:09 bsekachev

I do as you talked,when I click the submit,it seems successfuly implement The data is being uploaded to the server..,but I get another error in the step of Media files are being extracted...

Could not create the task Error: Could not create the task on the server. Work-horse process was terminated unexpectedly (waitpid returned 9).

the image I submit is 490MB(17920*14400),it seems the process wait a long time and terminated.

cvat_proxy | 172.18.0.1 - - [22/Sep/2020:08:54:44 +0000] "GET /api/v1/tasks/68/status HTTP/1.1" 200 66 "http://localhost:8080/tasks/create" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" cvat_db | 2020-09-22 08:55:04.547 UTC [41] LOG: unexpected EOF on client connection with an open transaction cvat | 2020-09-22 08:55:06,703 DEBG 'rqworker_default_1' stderr output: cvat | WARNING:rq.worker:Moving job to FailedJobRegistry (work-horse terminated unexpectedly; waitpid returned 9) cvat |

tingfengwanxiao avatar Sep 22 '20 07:09 tingfengwanxiao

I can suggest you try to install CVAT with connected shared storage. You can create tasks browsing the storage client side and selecting necessary files.

bsekachev avatar Sep 22 '20 09:09 bsekachev

@tingfengwanxiao , I don't think that we support of such big images for now. Need to slice it to show efficiently in UI.

nmanovic avatar Sep 22 '20 09:09 nmanovic

It looks like the process has crashed due to out of memory error. You can check it with dmesg -HTw on the host.

zhiltsov-max avatar Sep 23 '20 09:09 zhiltsov-max

@nmanovic Hi any update on this issue?

I try to upload large images (800M Pixels) and receive this error: image

I am modifying these:

supervisord: image

base.py: image

image

manage.py: image

To modify these I am running docker-compose stop and then changing these files and parameters and then running docker-compose up -d.

  1. Is this the correct way to effectively modify files in the container
  2. Is it possible to upload large images in docker e.g 800M Pixels

Thank you! Sam @zhiltsov-max

davodogster avatar Aug 23 '21 09:08 davodogster

@nmanovic Hi any update on this issue?

I try to upload large images (800M Pixels) and receive this error: image

I am modifying these:

supervisord: image

base.py: image

image

manage.py: image

To modify these I am running docker-compose stop and then changing these files and parameters and then running docker-compose up -d.

  1. Is this the correct way to effectively modify files in the container
  2. Is it possible to upload large images in docker e.g 800M Pixels

Thank you! Sam @zhiltsov-max

Hey did it work?

gamingflexer avatar Nov 19 '22 16:11 gamingflexer

It did not worked 🥲

Also i tried this, it did not worked.

from PIL import Image
Image.MAX_IMAGE_PIXELS = 100000000000

So last option i have create --> Smaller Sets of Task like 50 images ⭐️

gamingflexer avatar Nov 19 '22 17:11 gamingflexer

@gamingflexer We were able to upload huge images e.g 4000 x 8000 by mounting a share drive to the docker container - it's in CVAT documentation. And the task upload is instant aswell. Cheers

davodogster avatar Nov 20 '22 19:11 davodogster

@gamingflexer We were able to upload huge images e.g 4000 x 8000 by mounting a share drive to the docker container - it's in CVAT documentation. And the task upload is instant aswell. Cheers

Thanks ! i will try that for sure

gamingflexer avatar Nov 21 '22 02:11 gamingflexer

@gamingflexer We were able to upload huge images e.g 4000 x 8000 by mounting a share drive to the docker container - it's in CVAT documentation. And the task upload is instant aswell. Cheers

Thanks ! i will try that for sure

The issue still persists i have mounted the docker external drive and it is visible in cvat but still same.

Screenshot 2022-11-27 at 11 56 29 AM

gamingflexer avatar Nov 27 '22 06:11 gamingflexer

Hello,

Is there any update on this? I was able to upload images to the task but I get "Server Error 500" when attempting to open up the task itself.

I uploaded the image by adding the line "Image.MAX_IMAGE_PIXELS = None" to my import workers and loading the image from connected file share.

The image is approximately 18000 x 36000 pixels, ~150 MB.

tswie avatar Jan 04 '24 17:01 tswie

If you attach cloud storage, you can use bigger images than PIL limit. (https://docs.cvat.ai/docs/manual/basics/attach-cloud-storage/)

joao-dourado avatar Jun 12 '24 20:06 joao-dourado

I can upload an image with size (20000 x 14000), but there is another error throw out: DOMException: CanvasRenderingContext2D.scale: Canvas exceeds max size.

Do you have any idea on this? It may come from browser support and really hard to fix https://jhildenbiddle.github.io/canvas-size/#/?id=test-results

ducviet00 avatar Jul 18 '24 08:07 ducviet00