We have got several hundrets of photos for an online shop shot on different models. All of them have a plain white background, but vary in clipping (?).

We need to crop them in following way:

  • aspect ration needs to be the same with 1116x1184 (as we have other images with this size).
  • the shoulder of the models should be at the same height.
  • the lower edge of the shirts / hoodies should be at the same height.

This image shows the lines to align over all the images: enter image description here

We tried following in Photoshop:

  • have one image as template as a base layer
  • pull in the next image as new layer
  • reduce opacity to see the first image
  • resize and position it above the other image
  • set opacity back to 100%
  • save / export it as JPEG

Is there a faster way to get this job done? Thanks for any input!

  • 4
    \$\begingroup\$ I'm voting to close this question as off-topic because it is better handled on StackOverflow since it is more about programming than photography. \$\endgroup\$
    – xenoid
    Commented Nov 28, 2019 at 15:02
  • 1
    \$\begingroup\$ @xenoid no, it's not. it's manual labor, as the alignment needs to be done by humans. If you show me an alogrithm capable doing this, I am more than happy to automate it. Belive me, outsourcing this kind of work costs a lot. I would be rich already, if it would be a programming problem. I am software developer ;) \$\endgroup\$
    – andreas
    Commented Nov 28, 2019 at 15:59
  • \$\begingroup\$ but, still, an algorithm for cropping pictures that have already been taken really has very little to do with photography itself... \$\endgroup\$
    – twalberg
    Commented Nov 28, 2019 at 17:28

2 Answers 2


If you have guides to align shoulders/lower edge and possibly the center of the t-shirt, you don't need to play with opacity to align on a model. I don't know PS, but with Gimp:

  • There is an ofn-preset-guides script to create custom guides with a single keystroke
  • There is an ofn-file-next script that does "Save & close current image, open next" that can also be associated to a keystroke (this alone saves 80% of the labour...)
  • The Scale tool (that can also be use to move things around) can be set to keep the aspect ratio (and can be the default active tool...).

So after a bit of set up you can realign all your pictures manually, but in a matter of seconds per picture. Once the pictures are realigned/rescaled, you can bulk-crop them with ImageMagick.

Both scripts mentioned above can be found here.

  • \$\begingroup\$ sorry for being ignorant, but it really didn't come up my mind... If I can't get the open pose approach working, I will try your approach.. but I am still convinced it's not a question for stack exchange, as most of photographers don't have an it background. Everybody doing apparel product photography shooting hundreds or thousands images a day is either looking for a solution to handle this in a way of least effort. \$\endgroup\$
    – andreas
    Commented Nov 30, 2019 at 7:30
  • \$\begingroup\$ Oh, missed the second half of sentence: ..., or to outsource it to India. \$\endgroup\$
    – andreas
    Commented Nov 30, 2019 at 7:39

From the comments:

If you show me an alogrithm capable doing this, I am more than happy to automate it.

For a software approach I would try to use OpenPose, a deep-learning based human posture tracking stack.

They have pre-packaged builds so you don't need to recompile anything yourself. You just need to download the neural network model, put stuff in the correct location and follow the usage instruction.

You would run the openpose program on each image independently. This will output a .json file with "keypoints" representing a human model. By default it uses a 25-point model which is fine for this application.

From this you can determine the 2D position of the head, shoulders, hands and hips, which should be enough to let you normalize the images.

You would first fix the scale of the image by upscaling or downscaling based on the expected pixel height of the zone between shoulders and hips. Then you would shift up or down to match the location of the zone. For images that need to be zoomed out or shifted in a way that "reveal" missing parts of the photograph, use whatever system you would use manually, for example adding blank space.

  • \$\begingroup\$ thanks for this suggestion. Since years I say to myself: start to learn about this AI stuff. But always had been too busy. I definitely give it a try! \$\endgroup\$
    – andreas
    Commented Nov 30, 2019 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.