stashapp / stash-box

Stash App's own OpenSource video indexing and Perceptual Hashing MetaData API
MIT License
210 stars 61 forks source link

[RFC] Performer Image Categorization #237

Open AdultSun opened 2 years ago

AdultSun commented 2 years ago

Scope

There is a significant desire to better organize performer images on stash-box, particularly by allowing images to be categorized by crop, pose, and state of dress.

Problem

Stash-Box performer images are currently organized by resolution only, basically serving the highest resolution image first followed by the rest in descending order. More popular performers can have many images and our StashDB guidelines encourage a diverse set for each performer representing various crops, poses, states of dress, and general "looks" from the performer's career. Typically, users will prefer a particular type of performer image for their personal use and are often left navigating stash-box's image carousel one-by-one until they find the "best" image. Currently, the only way to set a default image for a particular performer in stash-box is by making sure the preferred image has a higher resolution then the rest of the set. This is an imperfect work-around that requires maintaining a hard cap on image resolution for each performer rather than a true solution.

Proposal

The implementation of image categories could help to alleviate these issues. If individual images can be tagged with categories, users could set their own preferred defaults within both stash-box and their personal stash. A convenient system for categorization is already in use in the actress-images repo hosted by Trizkat. Though the collection is exclusively female performers (outside of a small number of AFAB non-binary performers), their system appears to be neutral enough to be suitable for performers of all genders. In their own words, with some light editing:

Crop

How much of the performer is visible?

Possible expansions on this system could include a full-length crop for head-to-toe images, more specifics for non-nude states (swimsuit/lingerie/casual/formal), and approximate release dates/years to allow users to sort by date. Many more recent uploads to the actress-images repo represent a slightly expanded 3Q crop with more specific guidelines for the model's positioning within the frame, which may or may not necessitate an additional category of 3Q+ or similar.

Standardization

Similar to other areas of stash-box, easily visible guidelines on relevant edit pages will greatly aid less experienced editors in conforming to established community standards. In this case, those guidelines would be clear definitions for the newly introduced terms above. This will require an agreed-upon level of standardization for these images to encourage consistency from performer to performer. Questions to consider while developing this standard:

Further Development

In addition to a more basic implementation of categories for performer images, more advanced features have been suggested:

echo6ix commented 2 years ago

Well done @AdultSun

First, I think we can borrow a lot of pointers for our guidelines from https://www.themoviedb.org/bible/image

easily visible guidelines on relevant edit pages will greatly aid less experienced editors in conforming to established community standards

Yes. Very important. I am lazy and often neglect reading rules/guidelines unless they're in-my-face, clear, and concise. I am probably not alone here. Rub the guidelines in my face on the same page where I am uploading an image.

How big should the images be?

I am not opposed to images larger than 1280 pixels, but I also have not read a compelling reason why they need to be larger than that. These images will be populating the performer's profile picture in Stash, they aren't being consumed in the image galleries, so what is the point?

In any case, if it is decided to use higher resolution images, consider implementing an automated process that creates an alternate resized version (1280 pixels) of every high-res image. Users could have a local Stash setting that toggles between downloading hi-res or low-res performer images. This would satisfy the concerns Fonzie@Discord mentioned re: high-res images.

An image editor within the browser could allow users to conform to more specific standards without the need of advanced standalone software like Photoshop or GIMP...

If y'all suspect a large majority of StashDB image content is going to be manually crowdsourced, then do this. I do not think an image editor per se is a required, but a Javascript image cropper with hard-coded guide overlays that correspond to each image "category".

I strongly suspect this will leave less open to user interpretation and result in higher quality and more consistent image crop contributions.

How specific should our standard be?

High level of specificity for consistent content.

This is a sample from my own personal guidelines that I stole from a modeling photography site:

Portrait head shot types

1/4 tight headshot

Crop from the collar bone area or just above shoulders[^shoulder] to just above the head.[^head] Link to headshot template finalized by AdultSun and I.

~~### 1/4 headshot Crop from mid-section, generally just below the the breast to just above the head.[^head]~~

1/2 headshot (bust)

Crop from the bellybutton (or precisely just above it as it's a great fixed reference point) to just above the head.[^head]

3/4 headshot

Crop from just above the knee to just above the head.[^head]

Body shot types

Incomplete because I don't care about full body shots :D

[^shoulder]: Crop just above the shoulder bone, that is clip out the shoulder bones, but keep the trapezius. [^head]: Always leave a small amount of padding between the top of the head and the top of image.

AdultSun commented 2 years ago

Thank you for your feedback, echo6ix! That page from TheMovieDB looks like a good resource. The professional definitions you found there are helpful too, and already line up nicely with the actress-images terms. One quick clarification...

I do not think an image editor per se is a required, but a Javascript image cropper with hard-coded guide overlays that correspond to each image "category".

That section was me half-remembering your suggestion from Discord a while back. You can blame my lack of technical expertise if my explanation was misleading. I try to use my words carefully but sometimes the correct terminology escapes me, so please feel free to question/correct me when that happens.

I agree that cropping images with guide overlays is really the only important action a feature like that would need to do. The only other functionality that could be helpful there is basic color adjustments or resizing/compressing to fit resolution/file size guidelines, but I imagine the latter would be implemented in the backend somewhere instead.

spincity07 commented 2 years ago

@AdultSun nice work on this RFC. I like the flexibility it provides and can see a day where you set the cover image you prefer in Stash and it pulls it from Stashdb for that or all performers.

I'd also agree that file sizes don't need to be that big. This will save space and bandwidth as well, but the performer images aren't very big in stash. No need to keep them gigantic on the server.

I agree that cropping images with guide overlays is really the only important action a feature like that would need to do.

I couldn't agree with this more. Hit everyone over the head with the guidelines and make it idiot proof.

I have nothing more to add but I wanted to affirm as an outside voice that I like this direction.

Chodbin commented 2 years ago

I would love to see this implemented as well with a couple of further suggestions;

Local Stash If the images are categorized, it would be nice if you could choose your preference when using tagger, for example;

State of Dress

Pose

Crop

So if these were my preferences it would always try and find first Topless, Portrait, Front, Bust

Scenes

Something similar could be implemented for scene images, but simpler. At the moment a scene can only have 1 image, I was thinking people could submit up to 3 categorized images in the following priority for stashdb (which a user could override in their local stash with preferences on a per-studio basis)

Perhaps also when people submit an image, a warning that it is a lower resolution than existing if they are replacing an image. There are probably some instances where this might be wanted, but some kind of confirmation/reason for it would be good, e.g. Existing image only shows performers foot

stg-annon commented 2 years ago

related to cropping these libraries might be useful:

smartcrop.js could be useful for automatically enforcing the standards that we want to use

JavaScript-Load-Image would be more of an in browser editor for manual use

echo6ix commented 9 months ago

@AdultSun Unless someone can make a compelling case why I am mistaken, I am abandoning support for this idea. At least for the idea of having rigidly enforced image specifications for these categories.

Back when we were fleshing out the specifications for some of these categories' I think we were a lot more idealistic. As it is now I would never expect submitters to strictly follow any image specifications, nor for voters to be up-to-date on the specs and use the level of detail required to catch mistakes.

In the event that some kind of guided cropping tool for each category was implemented I am skeptical it would be used properly.

TLDR I don't trust crowdsourcing to adhere to rigid image category specifications.

I think a more realistic route is to apply the following metadata to images as a means of categorization:

  1. Tags User created tags (as with scenes) won't be super accurate, but will be good enough to group like with like.
  2. Username The name of the user who submitted the image
  3. Vote count #436 Upvoting/downvoting image as a basic form of community quality control

Potential use-case for this metadata

If Stash were to get the ability to prioritize images based on that metadata it opens up the possibility for users to filter based on a specific user's type of contributions. Eg. prioritize images for 1/4 tight headshot and echo6ix. And the same goes for any other user who's following some strict template for consistent images.

StashDB itself could prioritize images based on vote count and a headshot tag for performer images displayed as thumbnails or other areas of the site.