Pose Crop
Person-aware Crop modes based on pose landmarks and face-based straightening.
Pose Crop is the right mode when the image contains a person and you want the crop frame to follow the body, face, or portrait composition. Set AutoStraightenMode: "Person" to straighten from pose landmarks. Use AutoMode: "Auto" to let Crop choose a preset, or AutoMode: "Fixed" plus CropModeIndex to request a specific crop preset.
Crop API workflows
One pose-aware crop engine for portrait delivery.
Use the same API surface for document photos, business portraits, fashion crops, and product-style person framing. Each example below shows the source image and the JPEG returned by the Cloud API.
Pose Parameters
| Field | Value | Description |
|---|---|---|
AutoMode | Auto or Fixed | Auto chooses from enabled crop presets. Fixed uses CropModeIndex. |
AutoStraightenMode | Person | Uses pose landmarks to calculate the straighten angle. |
CropModeIndex | 0..9 | Fixed crop preset index. Index 0 is the passport/document-style preset used by the examples. |
AutoCropSwitches | integer bitmask | Controls which pose crop presets are available to AutoMode: "Auto". |
CenterFaceHorizontally | boolean | Centers the detected face horizontally for pose automatic and fixed crop modes. |
AllowOutOfBounds | boolean | Allows fixed crop output outside the input image. Ignored by Auto. |
Fixed Pose Presets 0..9
CropModeIndex selects one of ten fixed person-aware crop presets. These names come from the Crop plugin preset list. The examples below were generated from the same source image with AutoMode: "Fixed", AutoStraightenMode: "Person", AspectRatio: "3 : 4", Extend: 10, and fixed output height 512.
| Index | Preset name | Typical use | AutoCropSwitches bit |
|---|---|---|---|
0 | Passport | Tight face and document-style portrait crops. | 1 << 0 |
1 | Face & Shoulders | Head-and-shoulders portraits, avatars, profile photos. | 1 << 1 |
2 | Upper Body | Portraits that include the upper torso and clothing. | 1 << 2 |
3 | Faceless Top | Upper-body fashion or product crops where the face should be excluded. | 1 << 3 |
4 | Faceless Body | Body/outfit crops without the face, useful for apparel catalogs. | 1 << 4 |
5 | Faceless Full | Full outfit/body crops that intentionally omit the face. | 1 << 5 |
6 | Legs | Lower-body, pants, shoes, or leg-focused crops. | 1 << 6 |
7 | Half Body | Waist-up editorial and ecommerce portraits. | 1 << 7 |
8 | Three Quarters | Three-quarter fashion and portrait framing. | 1 << 8 |
9 | Full Body | Complete person crops for lookbooks, fashion, and pose datasets. | 1 << 9 |
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Download JPEG
Fixed Pose Crop Example
This example requests a fixed pose crop with person-based straightening, the passport/document preset, moderate extension around the head and shoulders, and fixed output sizing. For the document-photo workflow, see the passport and ID photo crop guide.
{
"mode": "professional",
"outputFormat": "jpeg",
"tasks": [
{
"Plugin": "Crop",
"Layer": 0,
"User Params": {
"AutoMode": "Fixed",
"AutoStraightenMode": "Person",
"CropModeIndex": 0,
"AspectRatio": "3 : 4",
"CustomAspectX": 3,
"CustomAspectY": 4,
"CenterFaceHorizontally": true,
"CustomMargins": false,
"Extend": 25,
"FixSize": true,
"FixSizePixels": 512
}
}
]
}
Auto Pose Crop Example
Use AutoMode: "Auto" when the client wants Crop to choose the best pose preset from the enabled preset bitmask.
{
"mode": "professional",
"outputFormat": "jpeg",
"tasks": [
{
"Plugin": "Crop",
"Layer": 0,
"User Params": {
"AutoMode": "Auto",
"AutoStraightenMode": "Person",
"AutoCropSwitches": 2047,
"AspectRatio": "Original",
"CenterFaceHorizontally": true,
"Extend": 8
}
}
]
}
Pose Metadata
When Layer: 1 or ZIP output is used, Crop writes pose-related metadata to result.json. The live example below was generated from the same Mayra source on QueueWorker 1.076. It includes AI predicted, poseLandmarks, posePrediction, and subjectMask. Coordinates in poseLandmarks are normalized to the input image: x=0/y=0 is the top-left corner and x=1/y=1 is the bottom-right corner. posePrediction contains the additional model output values that are not landmark coordinate pairs.
Download full result.json or download the metadata ZIP.
{
"jsonVersion": "1",
"plugins": [
{
"AI predicted": {
"Angle": 3.3764288425445557,
"RotInvariant": 0.00023515203793067485
},
"operationIndex": 0,
"pluginName": "Crop",
"poseLandmarks": [
[
0.5089994090438729,
0.4074238118738867
],
[
0.5225381396570956,
0.39841209741542116
],
[
0.48565727400597836,
0.39841209741542116
],
[
0.5339759344191338,
0.40183006378123537
],
[
0.45928109957368723,
0.40120896907756104
],
[
0.574999988079071,
0.4625000059604645
],
[
0.42500001192092896,
0.4749999940395355
],
[
0.612500011920929,
0.550000011920929
],
[
0.4375,
0.5625
],
[
0.612500011920929,
0.6000000238418579
],
[
0.4124999940395355,
0.6499999761581421
],
[
0.5625,
0.637499988079071
],
[
0.4625000059604645,
0.637499988079071
],
[
0.612500011920929,
0.762499988079071
],
[
0.4625000059604645,
0.7749999761581421
],
[
0.637499988079071,
0.9125000238418579
],
[
0.44999998807907104,
0.9125000238418579
],
[
0.508415488020775,
0.41845506521174686
],
[
0.518336263225532,
0.4198535022349097
],
[
0.49441020855671364,
0.4198535022349097
],
[
0.5007130219518019,
0.43228318544337524
],
[
0.6535401344299316,
0.6253001093864441
],
[
0.6613345146179199,
0.6204189658164978
],
[
0.4000000059604645,
0.6875
],
[
0.4000000059604645,
0.675000011920929
],
[
0.6625000238418579,
0.9375
],
[
0.625,
0.9125000238418579
],
[
0.4375,
0.9375
],
[
0.4749999940395355,
0.925000011920929
]
],
"posePrediction": {
"bbox": {
"bottom": 1.0154527425765991,
"format": "normalized_ltrb",
"left": 0.02644200250506401,
"right": 0.9869680404663086,
"top": 0.22798845171928406
},
"classLabels": [
"noPerson",
"singlePerson",
"multiplePeople"
],
"classLogits": [
-10.418764114379883,
5.0828070640563965,
-4.0743632316589355
],
"classProbabilities": [
1.8522817413213488e-07,
0.9998942613601685,
0.00010544975521042943
],
"keypointConfidences": [
0.9315310120582581,
0.9024810194969177,
0.9104436039924622,
0.8874738812446594,
0.9081695675849915,
0.8815915584564209,
0.9055701494216919,
0.7048661708831787,
0.850712239742279,
0.2609982490539551,
0.8061178922653198,
0.8106412291526794,
0.8330028057098389,
0.8349280953407288,
0.868824303150177,
0.8039934039115906,
0.8377718925476074,
0.9376040101051331,
0.901678204536438,
0.8904788494110107,
0.8927474021911621,
0.0,
0.0,
0.618834912776947,
0.7436162829399109,
0.6950469613075256,
0.6931754946708679,
0.6922572255134583,
0.7525067329406738
],
"keypointCount": 29,
"modelOutputLayout": "keypoints58_bbox4_class3_conf29",
"multiplePeopleProbability": 0.00010544975521042943,
"noPersonProbability": 1.8522817413213488e-07,
"singlePersonProbability": 0.9998942613601685
},
"subjectMask": {
"counts": [
16232,
8,
160,
11,
159,
12,
157,
13,
155,
15,
155,
15,
155,
15,
155,
15,
155,
15,
156,
14,
156,
13,
158,
12,
158,
12,
159,
11,
159,
11,
159,
12,
158,
13,
157,
15,
154,
18,
151,
21,
148,
25,
143,
28,
141,
31,
137,
33,
136,
34,
135,
35,
134,
37,
132,
38,
132,
39,
131,
39,
131,
39,
131,
40,
130,
40,
131,
39,
131,
39,
131,
39,
131,
40,
130,
40,
131,
39,
131,
39,
131,
39,
131,
39,
131,
39,
131,
39,
131,
39,
131,
39,
132,
38,
132,
38,
132,
38,
133,
37,
133,
36,
134,
36,
134,
36,
133,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
134,
36,
135,
35,
135,
35,
135,
35,
135,
35,
135,
35,
135,
35,
135,
35,
135,
35,
135,
36,
134,
36,
134,
37,
133,
37,
133,
37,
133,
37,
133,
37,
133,
37,
133,
37,
133,
38,
132,
38,
132,
39,
131,
39,
131,
39,
131,
39,
131,
40,
130,
40,
130,
40,
130,
16,
1,
24,
129,
16,
1,
24,
129,
16,
1,
24,
129,
16,
1,
24,
129,
15,
3,
23,
129,
15,
3,
24,
127,
16,
3,
24,
127,
16,
4,
23,
127,
16,
4,
24,
126,
16,
4,
24,
126,
16,
4,
24,
126,
16,
4,
24,
126,
16,
4,
24,
126,
16,
5,
23,
126,
16,
5,
23,
126,
16,
5,
23,
126,
16,
5,
23,
126,
16,
6,
22,
125,
17,
6,
22,
125,
17,
6,
22,
125,
17,
6,
22,
125,
17,
6,
22,
125,
17,
6,
22,
125,
17,
6,
22,
125,
17,
7,
22,
124,
17,
7,
22,
124,
17,
7,
22,
124,
17,
8,
22,
123,
17,
8,
22,
123,
17,
8,
22,
123,
17,
8,
22,
123,
17,
8,
22,
123,
17,
8,
23,
122,
16,
9,
23,
122,
16,
10,
22,
122,
16,
10,
23,
121,
16,
11,
22,
121,
16,
11,
22,
121,
16,
11,
22,
121,
15,
12,
23,
120,
15,
12,
23,
120,
15,
13,
22,
120,
15,
13,
23,
120,
14,
14,
22,
120,
14,
14,
22,
120,
14,
14,
22,
119,
15,
14,
22,
119,
14,
16,
22,
118,
14,
16,
22,
118,
14,
17,
21,
118,
14,
17,
22,
117,
14,
17,
22,
117,
13,
18,
22,
117,
12,
19,
22,
118,
11,
20,
21,
119,
9,
22,
20,
123,
4,
23,
20,
151,
9,
2,
8,
152,
4,
8,
6,
1577
],
"encoding": "rle-v1",
"height": 256,
"largestMaskIndex": 2,
"startsWith": 0,
"width": 170
}
}
]
}