• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
2

Fashion e-commerce AutoSelect Subject and Crop

Community Beginner ,
Mar 02, 2020 Mar 02, 2020

Copy link to clipboard

Copied

Hi friends,

I'm looking for a script that detects a subject and crops the image.

 

Workflow

I get thousands of RAW files with a wide framing. Same camera all over the shooting, same pixel dimensions. Models move and change pose.

I develop on C1 and export PSD files.

Work on the PSD files and export JPEG for the client.

 

Script

Detect Model's height and crop leaving a few pixels above the head and bellow the feet.

Model should be centered on the image.

Keep aspect ratio 2:3.

 

Input files

https://www.dropbox.com/sh/gbufidhfqic1f4b/AADlTLSsfwDxTDBL-RcQHAxxa?dl=0

 

Script.jpg

 

 

 

 

 

 

Thanks in advance!

TOPICS
Actions and scripting

Views

4.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Mar 20, 2020 Mar 20, 2020

Thanks all for your help!

After reading all the proposals I came out with an action. Please take a look at it and let me know your comments.

The action runs auto-select, expands the selection 35px, creates a filled temp layer, transforms and uses the trim command.

 

To keep the 3:2 proportion I considered the model's height:

Width = 0.667 × Height

Once the model's height is "mapped" by the autoselect command I just copy the selection, rotate 90° and contract the width to 66.7%.
Then trim transparent pi

...

Votes

Translate

Translate
Adobe
New Here ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

latest ladies fashion wears in uk wholesale dealer. get latest party wears, shirts, skirts, coats, tops and trousers. New stock available with different variants

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

So maurom15189996 you now have at least two different methods to achieve your stated goal.

 

Any feedback, comments? Likes? Marking one or more posts as the Correct Answers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

Thanks all for your help!

After reading all the proposals I came out with an action. Please take a look at it and let me know your comments.

The action runs auto-select, expands the selection 35px, creates a filled temp layer, transforms and uses the trim command.

 

To keep the 3:2 proportion I considered the model's height:

Width = 0.667 × Height

Once the model's height is "mapped" by the autoselect command I just copy the selection, rotate 90° and contract the width to 66.7%.
Then trim transparent pixels on top, bottom, left and right.

 

Download:

Autocrop.atn 

 

autocropactionautocropaction

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

Great job maurom15189996 I really like it, you have come up with a workable native solution and I too would have marked it as the correct answer!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2020 Mar 22, 2020

Copy link to clipboard

Copied

Just a little question :

I do not understand translations purpose (0,5/0,5 and then 0,5).

Capture d’écran 2020-03-22 à 17.10.44.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 24, 2020 Mar 24, 2020

Copy link to clipboard

Copied

Hi didiermazier ,

I had to ad it in order to compensate for the "half pixels" produced by the round-up of the resulting number.

2:3 = 0.666`

The client is requesting a size of 2000x1333px and this fixed it quickly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2020 Mar 25, 2020

Copy link to clipboard

Copied

Thanks for the info.

Just adding 2 tips that do not enhance a lot your excellent solution but can help anyhow :

  • instead of creating a filling layer, just duplicate twice the subject (Ctrl+J(pc) Command +J (Mac)) shorten the process with one step less (no having to rasterize layer)
  • Since all inputs fields are accepting operators you can enter "100%*2/3" and Photoshop will do the math for you

Anyway very interesting and inspiring thread, thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 25, 2020 Mar 25, 2020

Copy link to clipboard

Copied

Thanks for that!!

I optimized the action as adviced and updated to the link posted above.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2020 Mar 25, 2020

Copy link to clipboard

Copied

didiermazier Photoshop actions sometimes seem to record this unnecessary 0.5 translation even when it is not explicitly called for. Go figure!

 

My version of the refined action is linked below as the one from maurom15189996 was not updated?

 

I removed the first tool selection step as it is not necessary (I also removed the 0.5px values).

 

AutoCrop2_3_Refined.atn

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2021 Aug 21, 2021

Copy link to clipboard

Copied

Hi! I've come acrosss your action while looking for a solution to some what (or in my dream life fully) automate center cropping for portraits. This generally takes me an additoional 1-2 hours per school for school photos. I've loaded the action and tried it out, and it works fabulously as written. However for my needs I need it to be portrait, vs full body.  I'm hoping for some guidance in adjusting the action, I'm still quite new at photoshop and can't figure how to change the shrunken person layers to acheive this.. Anyone want to spoil me and help? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2021 Aug 21, 2021

Copy link to clipboard

Copied

I would suggest that you create a new topic, with a link back to this topic as a reference.

 

It would help if you could post 2-3 different images before/after to illustrate what you are trying to achieve.

 

As these are school portraits, please redact/pixelate etc. the faces for privacy, but don't affect the hair or other areas of the image that may be needed for select subject or other possible selection methods.

 

If these are high resolution, then perhaps make them half size, if they are resized too small then there may be too few pixels to accurately work with.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

The solution from this topic is very similar to user expectations, so no need to create new topic. Of course let him say something more to see how close it is to that he wants. Probably the script / action must be extended of the part it cuts 2 / 3 of bottom part and additionally narrows the sides.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

Rotating is a brillant idea!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 22, 2023 Aug 22, 2023

Copy link to clipboard

Copied

LATEST

hey mods, there are multiple spam bots in this thread...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines