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

Timeout issue loading images for other APIs #311

Closed
jamesw-cogapp opened this issue Aug 29, 2019 · 4 comments
Closed

Timeout issue loading images for other APIs #311

jamesw-cogapp opened this issue Aug 29, 2019 · 4 comments

Comments

@jamesw-cogapp
Copy link

Hello,

I'm having issues using Google Vision with a cantaloupe server. It works fine with lower resolution images but with higher resolution ones it appears that the images are not loading fast enough on the server. Is there a way around this?

The server has 2G CPU and 4G memory dedicated to it.

Thanks.

@adolski
Copy link
Contributor

adolski commented Aug 30, 2019

Hi,

Where are your images hosted (i.e. what Source are you using)? What format(s) are they and what kinds of images are you trying to retrieve from the image server (thumbnail sized, tile sized, larger?) This may help if you haven't seen it yet.

@jamesw-cogapp
Copy link
Author

Hello,

They are hosted on AWS in an S3 bucket.

They are in PTIF format and we are retrieving high resolution jpegs. ~ 3000 px wide.

Thanks.

@adolski
Copy link
Contributor

adolski commented Sep 3, 2019

It's normal for response times to slow down roughly in proportion to output dimensions. Comparing a 3000x3000 image to a 500x500 image (for example), there are 36x more pixels to JPEG-compress and there's no way around that.

A couple of ways to compensate are to employ a faster CPU, or to make multiple requests for smaller tiles, which can be handled by multiple threads/cores.

(This might also be related to #296.)

@jbarth-ubhd
Copy link

If it would have been more than factor 1/8 on one axis, you could have taken the "dc" component only (of Y, Cb, Cr) of each 8x8 jpeg tile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants