ADR-0036 Aspect and size of DressMeUp photos

Publication Date2022-06-24
Last Update2022-06-24


Users of the DressMeUp app can use their camera to take a photo, or they can upload an existing photograph from their library. That means we don’t have a way of consistently extracting the camera parameters of the photograph.

However, we need to specify some camera parameters for both pose detection and for garment rendering.

Also, the rendering resolution is important because if it’s too high it can make the rendering time prohibitively expensive.


Viewport size

To simplify the pipeline, and also to get some consistent processing times, we will fix the sensor size of the virtual camera. In rendering terms, that’s the size of the viewport. We will use the same settings used for EcoShot Drafts (in EcoShot v1), that is:

aspect: "2:3"
resolution: "912×1368"

Camera position

We will fix the camera position and rotation to match the EcoShot Studio camera B, which it’s place 3 meters away from the subject at around waist height. The camera isn’t tilted, and it’s facing straight to the subject. Numerically, that’s expressed as:

camera_rotation: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
camera_position: [0.0, 95.0, 301.0]

User guidelines

The app will need to include some clear guidelines so the user understands the kind of input we expect. That is:

  • Their whole body should be visible in the picture frame.
  • The camera should be roughly located at waist height, with no tilt if possible.
  • Photos should be taken vertically, with 2:3 aspect where possible.

Rather than just words, some visual guidelines would be ideal.

Preprocessing of photographs

The photographs need to be cropped to match the 2:3 aspect. We will always assume that the subject is always standing and that the photo is oriented correctly (this can be done with Image Magick --auto-orient). That means that if a photograph with horizontal aspect is uploaded, we will crop the sides.

In the first version, we won’t attempt to find the subject in the photograph. If the aspect is greater than 2:3, we will crop around the center and crop the sides to match the aspect. If the aspect is smaller than 2:3, we will crop from the top and bottom.

The image doesn’t need scaling. The final output will be scaled to 912×1368, but we can keep the highest resolution until the end to avoid any blurring artifacts.

The preprocessing could be done in the app, but in case we want to support other aspects and camera settings later on, it is better that we implement this as part of the service. In the step function that process jobs, it should be the first thing that gets done after collecting the inputs.


We will need to update the app with some guidelines for the user.

We will need to add a step in the step function to preprocess the photograph and temporarily store the cropped image somewhere.