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

Revamp to allow images with different aspect ratios #918

Open
jrosindell opened this issue Nov 25, 2024 · 6 comments
Open

Revamp to allow images with different aspect ratios #918

jrosindell opened this issue Nov 25, 2024 · 6 comments

Comments

@jrosindell
Copy link
Member

We've got a design around square images which is nice but to what extent is this a pinch point - perhaps we should allow uncropped images to appear at least on leaves and possibly on signposts as well.

@davidebbo
Copy link
Collaborator

Sort of duplicate of OneZoom/tree-build#78, though that one conflates ratings and crops.

@hyanwong
Copy link
Member

I'm not that keen, to be honest. Or at least, we can't allow arbitrary sizes (e.g. 10 px x 2000 px for a snake). The neatness and convenience of square crops is very helpful e.g. on the main page, and it focusses attention on getting a decent resolution image of the "important" part of an organism. If we have a mix of portrait and landscape images in the 4x2 composites of internal nodes, it is likely to look a bit rubbish.

On the leaves what's to be gained by allowing non-square aspect ratios? Isn't this the same as tweaking the crop algorithm to add transparency above and below (or left and right)? I worry that we will then accept images which will appear tiny compared to others.

@davidebbo
Copy link
Collaborator

I think we're reacting to seeing really bad square AI crops of skinny images. But things probably would look a lot more reasonable if we used the best possible square crops of those images.

Let's take a fairly extreme example: https://upload.wikimedia.org/wikipedia/commons/c/ce/Moanasaurus2.png

image

Right now, we're showing the tail:
image

But it could look like:

image

And of course, that doesn't capture the true shape of the animal, but it's not terrible, and it avoids all the issues of having a non-square image that ends up looking tiny. Sort of a case of finding the lesser evil...

@hyanwong
Copy link
Member

that doesn't capture the true shape of the animal, but it's not terrible

I agree. I think the best in this case would be a crop that allows a little whitespace above and below, but not the full length. That would require "more intelligent AI", but eventually will probably be workable. I have hand-cropped a number of the original OneZoom images rather like this. In this case that might include a bit of flipper, e.g.
image

@hyanwong
Copy link
Member

hyanwong commented Nov 26, 2024

The other thing we could do is to slightly bias the image choice in favour of aspect ratios that are slightly squarer, e.g.
this one which would hopefully be cropped as:

Screenshot 2024-11-26 at 09 53 21

@davidebbo
Copy link
Collaborator

davidebbo commented Nov 26, 2024

That's for a different species, right? For https://en.wikipedia.org/wiki/Moanasaurus, it's just the one image.

The challenge is that it's hard to qualify the images. We do know that 'reconstructions' tend to be decent. If we replace an elongated reconstruction by a much more square image of a fossil fragment, it may not be an improvement.

I think the best in this case would be a crop that allows a little whitespace above and below, but not the full length. That would require "more intelligent AI", but eventually will probably be workable.

Yes, I think this is a good direction. It could be mostly automated, where the only guidance we'd give it is left, right, up or down, and it would make a crop of that side, while guaranteeing to keep at least (say) 50% of the long side, by adding whitespace as needed. That might be a be cheaper than an all-out hand crafted selection (although with good tools, it's probably not hard either, especially if we all pitch in).

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