1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'RPC', 'product' => 'imageseg', 'version' => '2019-12-30'],
'directories' => [
[
'children' => ['ChangeSky', 'RefineMask', 'SegmentBody', 'SegmentCloth', 'SegmentCommodity', 'SegmentCommonImage', 'SegmentFood', 'SegmentHair', 'SegmentHDBody', 'SegmentHDCommonImage', 'SegmentHDSky', 'SegmentHead', 'SegmentSkin', 'SegmentSky'],
'type' => 'directory',
'title' => 'Segmentation',
],
[
'children' => ['GetAsyncJobResult'],
'title' => 'Others',
'type' => 'directory',
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'ChangeSky' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the target image whose sky you want to replace. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/ChangeSky/ChangeSky2.jpg', 'title' => ''],
],
[
'name' => 'ReplaceImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the reference image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/ChangeSky/ChangeSky6.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'F9D60817-EC5A-4BAC-9092-4AD42220CFA8', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the image after sky replacement.'."\n"
.'After segmentation, a four-channel PNG image is returned. The image is uncompressed, the dimensions remain unchanged, and the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_skySegmentator/2020-7-24/invi_skySegmentator_015955791588111000000_5pn2QM.jpg?Expires=1595580958&OSSAccessKeyId=LTAI****************&Signature=Sq4po8h3WAj%2BBFrCgTP3ghlXn4****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable. '],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"F9D60817-EC5A-4BAC-9092-4AD42220CFA8\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_skySegmentator/2020-7-24/invi_skySegmentator_015955791588111000000_5pn2QM.jpg?Expires=1595580958&OSSAccessKeyId=LTAI****************&Signature=Sq4po8h3WAj%2BBFrCgTP3ghlXn4****\\"\\n }\\n}","type":"json"}]',
'title' => 'Sky replacement',
'summary' => 'This topic describes the syntax and examples of the ChangeSky operation.',
'description' => '## Feature description'."\n"
.'Given two images, the sky replacement feature replaces the sky style in target image A with the sky style from reference image B, thereby changing the sky appearance of target image A.'."\n"
.'The following images show examples of this operation:'."\n"
."\n"
.'- Target image A'."\n"
.''."\n"
."\n"
.'- Reference image B'."\n"
.''."\n"
."\n"
.'- Target image A after replacement'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=ChangeSky) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/ChangeSky?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FChangeSky%2FChangeSky1.jpg%22%2C%22ReplaceImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FChangeSky%2FChangeSky6.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: PNG, JPEG, JPG, or BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 50 × 50 pixels and less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'The sky replacement feature is currently in public preview and can be called for free.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'To use the sky replacement feature under the Alibaba Cloud Visual AI Image Segmentation category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the Image Segmentation (imageseg) AI category. The SDK supports both local files and arbitrary URLs as file parameters. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the sky replacement feature, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-11-18T05:36:20.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeSky'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'viapi-imageseg:ChangeSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'GetAsyncJobResult' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'JobId',
'in' => 'formData',
'schema' => ['description' => 'The RequestId returned by the asynchronous operation. You can use this parameter to query the actual result of the asynchronous operation.', 'type' => 'string', 'required' => true, 'example' => 'E75FE679-0303-4DD1-8252-1143B4FA8A27', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '43A0AEB6-45F4-4138-8E89-E1A5D63200E3', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Status' => ['description' => 'The status of the asynchronous task. Valid values:'."\n"
."\n"
.'- QUEUING: The task is queuing.'."\n"
."\n"
.'- PROCESSING: The task is being processed.'."\n"
."\n"
.'- PROCESS_SUCCESS: The task was processed.'."\n"
."\n"
.'- PROCESS_FAILED: The task failed to be processed.'."\n"
."\n"
.'- TIMEOUT_FAILED: The task timed out.'."\n"
."\n"
.'- LIMIT_RETRY_FAILED: The maximum number of retries was exceeded.', 'type' => 'string', 'example' => 'PROCESS_SUCCESS', 'title' => ''],
'ErrorMessage' => ['description' => 'The error message of the asynchronous task.', 'type' => 'string', 'example' => 'paramsIllegal', 'title' => ''],
'Result' => ['description' => 'The actual result of the asynchronous task. You must deserialize the result on your own.', 'type' => 'string', 'example' => '{"ImageUrl":"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_/2020-4-2/invi__015858226731531000018_UE7B9p.png?Expires=1585824473&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSR****&Signature=etyeYQQ%2BWAyQTqQKd8Xq0GiOW****"}', 'title' => ''],
'ErrorCode' => ['description' => 'The error code of the asynchronous task.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''],
'JobId' => ['description' => 'The asynchronous task ID.', 'type' => 'string', 'example' => '49E2CC28-ED1D-4CC5-854D-7D0AE2B20976', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"43A0AEB6-45F4-4138-8E89-E1A5D63200E3\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"{\\\\\\"ImageUrl\\\\\\":\\\\\\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_/2020-4-2/invi__015858226731531000018_UE7B9p.png?Expires=1585824473&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSR****&Signature=etyeYQQ%2BWAyQTqQKd8Xq0GiOW****\\\\\\"}\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"49E2CC28-ED1D-4CC5-854D-7D0AE2B20976\\"\\n }\\n}","type":"json"}]',
'title' => 'Query asynchronous task results',
'summary' => 'This topic describes the syntax and examples of the GetAsyncJobResult operation for querying asynchronous task results.',
'description' => '# Feature description'."\n"
."\n"
.'After you invoke an asynchronous API operation, the response does not contain the actual result. Save the RequestId from the response, and then invoke GetAsyncJobResult to obtain the actual result.'."\n"
."\n"
.'> - Files generated by asynchronous tasks expire after 30 minutes. To retain them for long-term use, promptly download the files to a local server or store them in Object Storage Service (OSS). For more information about OSS operations, see [Upload objects](~~31886~~).'."\n"
.'- To learn more about how to access Alibaba Cloud Vision Intelligence Open Platform visual AI API operations, use the interfaces, or consult on issues, join the DingTalk group (23109592) to contact us.'."\n"
."\n\n"
.'Currently, the SegmentHDCommonImage operation in the image segmentation category is an asynchronous operation. You must invoke GetAsyncJobResult to obtain the actual result.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call Alibaba Cloud Vision AI operations. SDKs are available for multiple programming languages. File parameters support both local files and arbitrary URLs when you use an SDK. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Result deserialization'."\n"
."\n"
.'The following example shows the deserialized Result.'."\n"
."\n"
.'```'."\n"
.'{'."\n"
.' "ImageUrl": "http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_/2020-4-2/invi__015858228333801000019_zs0HOi.png?Expires=1585824633&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSR*****&Signature=YHSg24oLm3yk********%3D"'."\n"
.'}'."\n"
.'```'."\n"
."\n"
.'## Error codes'."\n"
."\n"
.'For more information, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically cleaned up and deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-04-24T08:11:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
],
],
'ramActions' => [
[
'operationType' => 'get',
'ramAction' => [
'action' => 'viapi-imageseg:GetAsyncJobResult',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RefineMask' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'MaskImageURL',
'in' => 'formData',
'schema' => ['description' => 'The coarse mask image that corresponds to the input image.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/RefineMask/RefineMask6.jpg', 'title' => ''],
],
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/RefineMask/RefineMask1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'E948F80B-86D9-54E0-9FF9-ACF3B1DA83C4', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'The output images.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the output refined mask image.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=1583406122&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E948F80B-86D9-54E0-9FF9-ACF3B1DA83C4\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=1583406122&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
'title' => 'Mask refinement segmentation',
'summary' => 'Describes the syntax and provides examples of RefineMask for mask refinement segmentation.',
'description' => '## Feature description'."\n"
.'The mask refinement segmentation feature refines an input image and a coarse mask to produce a refined mask.'."\n"
.'The following figures show examples of this operation:'."\n"
.'Input example screenshots:'."\n"
.''."\n"
.''."\n"
."\n"
.'Output example screenshot:'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=RefineMask) to experience this feature or purchase it online.'."\n"
.'- To consult about accessing Vision AI APIs, using interfaces, or resolving issues on the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Access guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/RefineMask?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FRefineMask%2FRefineMask1.jpg%22%2C%22MaskImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FRefineMask%2FRefineMask6.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development access steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Mask refinement segmentation sample code](~~605126~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels. The input image and the coarse mask image must have the same resolution.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of mask refinement segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The debugging interface below is a paid interface. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=RefineMask).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the mask refinement segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling this operation, select the SDK package for the Image Segmentation (imageseg) AI category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Mask refinement segmentation sample code](~~605126~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of mask refinement segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## SDK reference'."\n"
.'Alibaba Cloud Vision AI supports SDK calls. For more information, see [SDK overview](~~145033~~) to download and install the SDK.'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the experience debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-09-29T08:00:10.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RefineMask'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:RefineMask',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentBody' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Image format requirements:'."\n"
."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG are not supported), BMP, and WEBP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentBody/SegmentBody1.png', 'title' => ''],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'The format of the returned image.'."\n"
."\n"
.'- If set to `mask`, a single-channel black-and-white image is returned.'."\n"
."\n"
.'- If set to `crop`, a cropped 4-channel PNG image is returned (blank edges are cropped).'."\n"
."\n"
.'- If set to `whiteBK`, an image with a white background is returned.'."\n"
."\n"
.'- If not set or set to other values, a 4-channel PNG image is returned.', 'type' => 'string', 'required' => false, 'example' => 'mask', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '30EDCEEA-2806-44C6-AF0B-0988849106FE', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'The format of the returned image is determined by the request parameters.'."\n"
.'- If set to `mask`, a single-channel black-and-white image is returned.'."\n"
.'- If set to `crop`, a cropped 4-channel PNG image is returned (blank edges are cropped).'."\n"
.'- If set to `whiteBK`, an image with a white background is returned.'."\n"
.'- If not set or set to other values, a 4-channel PNG image is returned, uncompressed, with the original image dimensions preserved. The file size will increase.'."\n"
."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_humansegmenter/2021-3-31/invi_humansegmenter_016171823500001081370_Ej0WwO.jpg?Expires=1617184150&OSSAccessKeyId=LTAI****************&Signature=ZwaWXpAOMzHar%2B1wVO7zeSD83r****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"30EDCEEA-2806-44C6-AF0B-0988849106FE\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_humansegmenter/2021-3-31/invi_humansegmenter_016171823500001081370_Ej0WwO.jpg?Expires=1617184150&OSSAccessKeyId=LTAI****************&Signature=ZwaWXpAOMzHar%2B1wVO7zeSD83r****\\"\\n }\\n}","type":"json"}]',
'title' => 'Human body segmentation',
'summary' => 'This topic describes the syntax and provides examples of the human body segmentation feature (SegmentBody).',
'description' => '## Feature description'."\n"
.'The human body segmentation feature identifies human body contours in an input image, separates them from the background, and returns a segmented foreground portrait image (4-channel). This feature is applicable to real-person photos and is not applicable to cartoon images.'."\n"
.'The following figures show examples of this feature:'."\n"
."\n"
.'- Input image'."\n"
.''."\n"
.'- Output image (4-channel transparent image by default, with the same resolution as the original image)'."\n"
.''."\n"
."\n"
.'You can specify the ReturnForm parameter to define the output format:'."\n"
."\n"
.'- Set to **crop** to crop the blank edges'."\n"
.''."\n"
.'- Set to **mask** to return a binary mask image'."\n"
.''."\n"
.'- Set to **whiteBK** to return an image with a white background'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentBody) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Portrait photography: The human body segmentation feature separates the subject from the background and blurs the background to achieve a shallow depth of field effect, highlighting the subject.'."\n"
."\n"
.'- ID photo creation: Upload or take a casual photo. The feature precisely segments the person from the background. Combined with other background processing capabilities, you can create a standard ID photo.'."\n"
."\n"
.'## Advantages'."\n"
."\n"
.'- Hair-level precision: Provides higher segmentation accuracy for fine details. Even individual hair strands can be precisely segmented, making the result image look natural and unprocessed.'."\n"
."\n"
.'- Complex background adaptation: Even when the subject is in a complex background environment, the feature can accurately segment the human body from the background.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentBody?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentBody%2FSegmentBody1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in common programming languages and examples of post-processing results, see [Human body segmentation sample code](~~467471~~).'."\n"
."\n"
.'7. Direct client calls: Common client-side calling methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG are not supported), BMP, and WEBP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of human body segmentation, see [Billing overview](~~190132~~).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the human body segmentation feature under the Alibaba Cloud Visual AI Image Segmentation category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the API, select the SDK package for the Image Segmentation (imageseg) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code and best practices'."\n"
.'For sample code in common programming languages and examples of post-processing results, see [Human body segmentation sample code](~~467471~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of human body segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-11-01T05:49:48.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentBody'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentCloth' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => ['operationType' => 'none'],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The image URL. We recommend using an OSS link in the Shanghai region. If the file is stored locally or in a non-Shanghai region OSS, see [File URL Processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentCloth/SegmentCloth1.jpg', 'title' => ''],
],
[
'name' => 'OutMode',
'in' => 'query',
'schema' => ['description' => 'The type of segmentation result to return, which affects the content returned in the ImageURL field. This is an optional parameter.'."\n"
."\n"
.'- 0 (default): The default main clothing segmentation result.'."\n"
."\n"
.'- 1: A combined segmentation result of user-specified class categories.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '0或1', 'title' => ''],
],
[
'name' => 'ClothClass',
'in' => 'query',
'style' => 'repeatList',
'schema' => [
'description' => 'The clothing category. Valid values:'."\n"
.'- tops: Upper garment'."\n"
.'- coat: Outerwear'."\n"
.'- skirt: Skirt/Dress'."\n"
.'- pants: Trousers'."\n"
.'- bag: Bag'."\n"
.'- shoes: Shoes'."\n"
.'- hat: Hat',
'type' => 'array',
'items' => ['description' => 'The clothing category. Multiple values can be passed at a time. Valid values:'."\n"
.'- tops: Upper garment'."\n"
.'- coat: Outerwear'."\n"
.'- skirt: Skirt/Dress'."\n"
.'- pants: Trousers'."\n"
.'- bag: Bag'."\n"
.'- shoes: Shoes'."\n"
.'- hat: Hat', 'type' => 'string', 'required' => false, 'example' => 'tops', 'title' => ''],
'required' => false,
'maxItems' => 15,
'title' => '',
'example' => '',
],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'Specifies the format of the returned image. Valid values:'."\n"
."\n"
.'- whiteBK: Returns a white background image.'."\n"
.'- mask: Returns a single-channel mask.'."\n"
.'- If not set, a four-channel PNG image is returned.'."\n"
.'> - This parameter only applies to the output ImageURL. It does not affect ClassUrl, which always returns a mask channel image.', 'type' => 'string', 'required' => false, 'example' => 'whiteBK', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'BCE049A3-FE69-41CF-A870-5970156388A7', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'The array of returned elements.',
'type' => 'array',
'items' => [
'description' => 'The array of returned elements.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the returned segmentation result image.'."\n"
.'After segmentation, a four-channel PNG image is returned without compression. The image dimensions remain the same, but the file size may increase.'."\n"
.'> This URL is a temporary address valid for 30 minutes. After expiration, it will no longer be accessible. If you need to store the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/clothingsegmentation-2020-06-17-16-54-40-688c84cbbd-hnqfq/2020-6-18/invi__015924459307821000041_IIVHoM.png?Expires=1592447730&OSSAccessKeyId=LTAI****************&Signature=Hy8pn3IQj8nuKN0LEaC57cee9L****', 'title' => ''],
'ClassUrl' => [
'description' => 'Returns a URL corresponding to each clothing category based on the user-specified `clothClass` input.'."\n"
.'> This URL is a temporary address valid for 30 minutes. After expiration, it will no longer be accessible. If you need to store the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS or other storage.',
'type' => 'object',
'additionalProperties' => ['description' => 'Returns a URL corresponding to each clothing category based on the user-specified `clothClass` input.'."\n"
.'> This URL is a temporary address valid for 30 minutes. After expiration, it will no longer be accessible. If you need to store the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS or other storage.', 'type' => 'string', 'example' => '{\'tops\':http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/..,\'hat\':http://viapi-cn-shanghai-dha-segmenter...,...}', 'title' => ''],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BCE049A3-FE69-41CF-A870-5970156388A7\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/clothingsegmentation-2020-06-17-16-54-40-688c84cbbd-hnqfq/2020-6-18/invi__015924459307821000041_IIVHoM.png?Expires=1592447730&OSSAccessKeyId=LTAI****************&Signature=Hy8pn3IQj8nuKN0LEaC57cee9L****\\",\\n \\"ClassUrl\\": {\\n \\"key\\": \\"{\'tops\':http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/..,\'hat\':http://viapi-cn-shanghai-dha-segmenter...,...}\\"\\n }\\n }\\n ]\\n }\\n}","type":"json"}]',
'title' => 'Clothing Segmentation',
'summary' => 'This topic describes the syntax and examples of the clothing segmentation feature SegmentCloth.',
'description' => '## Feature Description'."\n"
.'The clothing segmentation feature can perform pixel-level segmentation on the main clothing in input images of mannequin outfits, real-person outfits, standalone garments, and virtual character outfits, and return the segmentation result. Clothing segmentation primarily performs fine-grained segmentation of clothing in images. The standard clothing segmentation supports segmentation of outerwear, upper garments (including lining), trousers, skirts, hats, shoes, and bags. For other items such as belts, ties, and other accessories, we recommend using [Product Segmentation](~~151961~~).'."\n"
.'The following shows example images of this feature:'."\n"
.'Input original image (left) and output result image (right)'."\n"
.'- Identified clothing categories: tops (upper garment), skirt (skirt/dress), shoes (shoes)'."\n"
.''."\n"
.'- Identified clothing categories: tops (upper garment), pants (trousers), shoes (shoes), bag (bag)'."\n"
.''."\n"
.'- Identified clothing category: hat (hat)'."\n"
.''."\n"
."\n"
.'You can pass the ReturnForm parameter to specify the format of the returned result:'."\n"
.'- Specify as **mask** to return a binary mask image.'."\n"
.''."\n"
.'- Specify as **whiteBK** to return a white background image.'."\n"
.''."\n"
.'- If no parameter is specified, a transparent background image is returned.'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- This feature is available for free trial on the Vision Intelligence Open Platform. You can click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentCloth) to try this feature interactively and make online purchases.'."\n"
.'- For questions about Alibaba Cloud Vision Intelligence Open Platform Vision AI API access, interface usage, or consultation, please contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Use Cases'."\n"
.'- E-commerce clothing segmentation: Perform foreground segmentation on e-commerce clothing images to achieve background separation and replacement, enabling batch processing and creation of e-commerce clothing main images.'."\n"
.'- Virtual try-on creation: In scenarios such as wedding photography, ethnic costumes, traditional Chinese clothing (Hanfu), and cosplay makeup, perform clothing segmentation as a pre-processing step, then use AIGC generation technology for outfit changing and virtual try-on.'."\n"
.'- Personalized intelligent recognition: Perform segmentation processing for specified category masks of outerwear, upper garments (including lining), trousers, skirts, hats, shoes, and bags in images, enabling customized clothing type segmentation.'."\n"
."\n"
.'## Key Advantages'."\n"
.'- Multi-type automatic recognition: Automatically identifies the main clothing in images without specifying clothing positions, and can return specified category masks.'."\n"
.'- Applicable to multiple clothing scenarios: Suitable for fine-grained segmentation scenarios including mannequin outfits, real-person outfits, standalone garments, and virtual character outfits.'."\n"
.'- Complex full-category segmentation: Suitable for multi-clothing product and complex background conditions for main clothing segmentation, achieving fine-grained full-category segmentation.'."\n"
."\n"
.'## Getting Started'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, you need to grant the AliyunVIAPIFullAccess permission to the RAM user. For detailed instructions, see [RAM Authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentCloth?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentCloth%2FSegmentCloth1.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK Overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Image Segmentation (imageseg) in the corresponding language SDK documentation and install it.'."\n"
.'- Refer to the sample code provided in the documentation, make appropriate modifications, and call the API.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages for this feature, see [Clothing Segmentation Sample Code](~~605161~~).'."\n"
."\n"
.'7. Client-side direct calls: Common client-side call methods for this feature include the following.'."\n"
.'- [Web frontend direct call](~~467779~~)'."\n"
.'- [Mini program direct call](~~467780~~)'."\n"
.'- [Android direct call](~~467781~~)'."\n"
.'- [iOS direct call](~~467782~~)'."\n"
."\n"
.'## Input Limits'."\n"
.'- Image format: PNG, JPEG, JPG, BMP.'."\n"
.'- Image size: No more than 3 MB.'."\n"
.'- Image resolution: Greater than 50×50 pixels and less than 3000×3000 pixels.'."\n"
.'- The URL must not contain Chinese characters.'."\n"
."\n"
.'## Billing'."\n"
.'For information about the billing methods and pricing of clothing segmentation, see [Billing Overview](~~190132~~).'."\n"
."\n"
.'> The debugging interface below is a paid interface. For free trial and debugging, please go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentCloth).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK Reference'."\n"
.'For the clothing segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend using the SDK for calling. Multiple programming languages are supported. When calling, select the SDK package with the AI category Image Segmentation (imageseg). File parameters can be passed via SDK to support both local files and arbitrary URLs. For details, see [SDK Overview](~~145033~~).'."\n"
."\n"
.'## Sample Code'."\n"
.'For sample code in commonly used languages for this feature, see [Clothing Segmentation Sample Code](~~605161~~).',
'extraInfo' => '## Error Codes'."\n"
.'For error codes related to clothing segmentation, see [Common Error Codes](~~146751~~).'."\n"
."\n"
.'## Security Notice'."\n"
.'- Please ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through experience debugging are valid for 1 hour and will be automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2024-07-19T02:14:58.000Z', 'description' => 'Request parameters changed'],
['createdAt' => '2023-12-06T02:08:23.000Z', 'description' => 'Request parameters changed, Response parameters changed'],
['createdAt' => '2022-03-30T06:07:10.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCloth'],
],
],
'ramActions' => [
[
'operationType' => 'none',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCloth',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentCommodity' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Image format requirements:'."\n"
."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG images are not supported), and BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentCommodity/SegmentCommodity1.jpg', 'title' => ''],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'The format of the returned image.'."\n"
."\n"
.'- If this parameter is not set, a 4-channel PNG image is returned.'."\n"
.'- If this parameter is set to `mask`, a single-channel mask is returned.'."\n"
.'- If this parameter is set to `whiteBK`, an image with a white background is returned.'."\n"
.'- If this parameter is set to `crop`, a 4-channel PNG image with the blank areas around the edges cropped is returned.', 'type' => 'string', 'required' => false, 'example' => 'mask', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'D6C24839-91A7-41DA-B31F-98F08EF80CC0', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'The format of the returned image is specified by the request parameter.'."\n"
."\n"
.'- If set to `crop`, a 4-channel PNG image with the blank areas around the edges cropped is returned.'."\n"
.'- If set to `mask`, a single-channel mask is returned.'."\n"
.'- If set to `whiteBK`, an image with a white background is returned.'."\n"
.'- If not set, a 4-channel PNG image is returned without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_segmenter/2019-12-20/invi_segmenter_015768355410261076021_Z3t0fc.png?Expires=1577094741&OSSAccessKeyId=LTAI****************&Signature=pkaKK3VlfsTR2r%2BYycJzTVEEos****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"D6C24839-91A7-41DA-B31F-98F08EF80CC0\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_segmenter/2019-12-20/invi_segmenter_015768355410261076021_Z3t0fc.png?Expires=1577094741&OSSAccessKeyId=LTAI****************&Signature=pkaKK3VlfsTR2r%2BYycJzTVEEos****\\"\\n }\\n}","type":"json"}]',
'title' => 'Commodity segmentation',
'summary' => 'This topic describes the syntax and provides examples of the commodity segmentation feature (SegmentCommodity).',
'description' => '## Feature description'."\n"
.'The commodity segmentation feature identifies the contours of commodities in an input image, separates them from the background, and returns the segmented foreground commodity image (4-channel). This feature is applicable to real-scene images and is not applicable to cartoon images. Commodity segmentation is designed to segment commodities whose full appearance is captured.'."\n"
.'The following figures show examples of this feature:'."\n"
."\n"
.'- Input image'."\n"
.''."\n"
.'- Output image'."\n"
.''."\n"
."\n"
.'You can specify the ReturnForm parameter to specify the format of the returned result:'."\n"
."\n"
.'- Set to **crop** to crop the blank areas around the edges.'."\n"
.''."\n"
.'- Set to **mask** to return a binary mask image.'."\n"
.''."\n"
.'- Set to **whiteBK** to return an image with a pure white background.'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentCommodity) to try this feature or purchase it online.'."\n"
.'- For questions about API access, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'Commodity poster creation: Segment the target commodity from a real-scene product photo, and then perform subsequent graphic design to create promotional images.'."\n"
."\n"
.'## Benefits'."\n"
."\n"
.'- Automatic commodity recognition: Automatically identifies the main commodity in an image and precisely segments the commodity from the background.'."\n"
.'- Support for multiple commodities and complex backgrounds: Supports commodity segmentation with multiple commodities and complex background conditions.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the feature: Make sure that you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentCommodity?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentCommodity%2FSegmentCommodity1.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [SegmentCommodity sample code](~~605160~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG images are not supported), and BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of commodity segmentation, see [Billing overview](~~190132~~).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the Image Segmentation category of Alibaba Cloud Vision AI, use the SDK for calling. Multiple programming languages are supported. Select the SDK package for the Image Segmentation (imageseg) category. File parameters can be passed as local files or URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [SegmentCommodity sample code](~~605160~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of commodity segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCommodity'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCommodity',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentCommonImage' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Image format requirements:'."\n"
."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG are not supported), BMP, and WEBP.'."\n"
.'- Image size: Up to 3 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels. The longest side must be less than or equal to 1999 pixels.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentCommonImage/SegmentCommonImage1.jpg', 'title' => ''],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'The format of the returned image.'."\n"
."\n"
.'- If this parameter is not set, a 4-channel PNG image is returned.'."\n"
.'- If this parameter is set to `mask`, a single-channel mask is returned.'."\n"
.'- If this parameter is set to `whiteBK`, an image with a white background is returned.'."\n"
.'- If this parameter is set to `crop`, a cropped 4-channel PNG image is returned (blank edges are removed).', 'type' => 'string', 'required' => false, 'example' => 'mask', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '1B8BEF02-0672-44CA-A974-4D6FAC392497', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'The format of the returned image is specified by the request parameter.'."\n"
.'- If the parameter is not set, a 4-channel PNG image is returned. The image is uncompressed, the dimensions remain unchanged, and the file size increases.'."\n"
.'- If the parameter is set to `mask`, a single-channel mask is returned.'."\n"
.'- If the parameter is set to `whiteBK`, an image with a white background is returned.'."\n"
.'- If the parameter is set to `crop`, a cropped 4-channel PNG image is returned (blank edges are removed).'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_segmenter/2019-12-20/invi_segmenter_015768355410261076021_Z3t0fc.png?Expires=1577094741&OSSAccessKeyId=LTAI****************&Signature=pkaKK3VlfsTR2r%2BYycJzTVEEos****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1B8BEF02-0672-44CA-A974-4D6FAC392497\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_segmenter/2019-12-20/invi_segmenter_015768355410261076021_Z3t0fc.png?Expires=1577094741&OSSAccessKeyId=LTAI****************&Signature=pkaKK3VlfsTR2r%2BYycJzTVEEos****\\"\\n }\\n}","type":"json"}]',
'title' => 'General-purpose image segmentation',
'summary' => 'This topic describes the syntax and provides examples of the SegmentCommonImage operation for general-purpose image segmentation.',
'description' => '## Feature description'."\n"
.'The general-purpose image segmentation feature identifies the contour of the visually central object in an input image, separates the object from the background, and returns the segmented foreground object image (4-channel).'."\n"
.'The following figures show examples of this operation:'."\n"
."\n"
.'- Input image'."\n"
.''."\n"
.'- Output image'."\n"
.''."\n"
."\n"
.'You can specify the ReturnForm parameter to specify the format of the returned result:'."\n"
."\n"
.'- Set to **crop** to crop the blank edges'."\n"
.''."\n"
.'- Set to **mask** to return a binary mask image'."\n"
.''."\n"
.'- Set to **whiteBK** to return an image with a white background'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentCommonImage) to try this feature or purchase it online.'."\n"
.'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API access or usage, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'Image editing: Intelligently separate the foreground and background of images in batches for subsequent image editing.'."\n"
."\n"
.'## Advantages'."\n"
."\n"
.'- Automatic subject recognition: Automatically identifies the main object in an image without additional specification.'."\n"
.'- Multiple scenarios: Applicable to segmentation scenarios involving people, animals, food, objects, and furniture. Not applicable to cartoon images.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentCommonImage?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentCommonImage%2FSegmentCommonImage1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find and install the SDK package for the Image Segmentation (imageseg) AI category in the corresponding SDK documentation.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code and best practices: For sample code in common languages and examples of post-processing results, see [General-purpose image segmentation sample code](~~467470~~).'."\n"
."\n"
.'7. Client-side direct calls: Common client-side call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG (8-bit, 16-bit, and 64-bit PNG are not supported), BMP, and WEBP.'."\n"
.'- Image size: Up to 3 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels. The longest side must be less than or equal to 1999 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of general-purpose image segmentation, see [Billing overview](~~190132~~).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the general-purpose image segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend that you use the SDK. Multiple programming languages are supported. Select the SDK package for the Image Segmentation (imageseg) AI category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code and best practices'."\n"
.'For sample code in common languages and examples of post-processing results, see [General-purpose image segmentation sample code](~~467470~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of general-purpose image segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCommonImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCommonImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentFood' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentFood/SegmentFood5.jpg', 'title' => ''],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'The format of the returned image.'."\n"
."\n"
.'- If this parameter is not set, a four-channel PNG image is returned.'."\n"
.'- If this parameter is set to `mask`, a single-channel mask is returned.'."\n"
.'- If this parameter is set to `whiteBK`, an image with a white background is returned.', 'type' => 'string', 'required' => false, 'example' => 'mask', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '38265D08-AD0F-4752-8E96-D1D9FB96C3D9', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the segmentation result image.'."\n"
.'The segmentation result is returned as a four-channel PNG image without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/foodsegmenter-2020-06-17-15-24-00-8658fc85b8-8ds8k/2020-6-18/invi__015924442076191000002_WqJ99N.png?Expires=1592446007&OSSAccessKeyId=LTAI****************&Signature=5ITSd6ndSuP7pUfoDFpgLPUOGg****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"38265D08-AD0F-4752-8E96-D1D9FB96C3D9\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/foodsegmenter-2020-06-17-15-24-00-8658fc85b8-8ds8k/2020-6-18/invi__015924442076191000002_WqJ99N.png?Expires=1592446007&OSSAccessKeyId=LTAI****************&Signature=5ITSd6ndSuP7pUfoDFpgLPUOGg****\\"\\n }\\n}","type":"json"}]',
'title' => 'Food segmentation',
'summary' => 'This topic describes the syntax and provides examples of the food segmentation feature (SegmentFood).',
'description' => '## Feature description'."\n"
.'The food segmentation feature performs pixel-level segmentation on food items in images and returns the segmentation results.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try this feature for free on the China site (Chinese). Click [China site (Chinese)](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentFood) to try this feature or purchase it online.'."\n"
.'- To get help with Visual Intelligence API integration, usage, or other questions, join the DingTalk group (23109592).'."\n"
."\n"
.'## Common scenarios'."\n"
.'- Restaurant menus: After photographing dishes, use food segmentation to extract the dishes from cluttered backgrounds and add them to menus.'."\n"
.'- Food advertising: In food industry promotions, extract food photos and process them into advertising materials.'."\n"
."\n"
.'## Advantages'."\n"
.'Wide adaptability: Supports automatic segmentation for most Chinese and Western dishes, bread, cakes, pastries, and more.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China site (Chinese)** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the feature: Make sure that you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentFood?spm=a2c4g.171485.0.i3) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke it.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from a mini program](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: PNG, JPEG, JPG, or BMP.'."\n"
.'- Image size: up to 4 MB.'."\n"
.'- Image resolution: greater than 40 × 40 pixels and less than 1999 × 1999 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of food segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The debugging API below is a paid API. To try it for free, go to the [China site (Chinese)](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentFood).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the food segmentation feature under the Visual AI Image Segmentation category. The SDK supports multiple programming languages. When making calls, select the SDK package for the Image Segmentation (imageseg) category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For information about error codes of food segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentFood'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentFood',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentHDBody' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Image requirements:'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG (transparent images).'."\n"
.'- Image size: Up to 40 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 6000 × 6000 pixels. The longest side must be 6000 pixels or less.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentHDBody/SegmentHDBody1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A8D3F5C3-E414-4981-8D84-E2CADF0B7CBC', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'The output image adds an alpha channel to the 3-channel original image to generate a 4-channel PNG image without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/segmenthdbody-2020-05-18-16-27-45-675d9884d7-kd9dz/2020-5-18/invi_humansegmenter_015897914589851000001_wQbLq9.png?Expires=1589793259&OSSAccessKeyId=LTAI****************&Signature=Lx6xSS0t7lqEvy5Qd1keccIAjL****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A8D3F5C3-E414-4981-8D84-E2CADF0B7CBC\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/segmenthdbody-2020-05-18-16-27-45-675d9884d7-kd9dz/2020-5-18/invi_humansegmenter_015897914589851000001_wQbLq9.png?Expires=1589793259&OSSAccessKeyId=LTAI****************&Signature=Lx6xSS0t7lqEvy5Qd1keccIAjL****\\"\\n }\\n}","type":"json"}]',
'title' => 'HD human body segmentation',
'summary' => 'This topic describes the syntax and provides examples of the HD human body segmentation feature (SegmentHDBody).',
'description' => '## Feature description'."\n"
.'The HD human body segmentation feature automatically identifies human body contours in an image, separates the human body from the background, and returns the segmented foreground human image. This feature is applicable to real human photos and is not applicable to cartoon images.'."\n"
.'The following figures show examples of this feature:'."\n"
.'- Input image'."\n"
.''."\n"
.'- Output image'."\n"
.''."\n"
."\n"
.'> - Compared with the SegmentBody operation, this operation supports segmentation of higher-resolution images, up to 40 MB.'."\n"
.'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHDBody) to experience this feature or purchase it online.'."\n"
.'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API access or usage, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Portrait photography: Human body segmentation separates the subject from the background and blurs the background to achieve a shallow depth of field effect with a large aperture, highlighting the subject.'."\n"
.'- ID photo creation: Upload or take a portrait photo. The feature precisely segments the person from the background. Combined with other background processing capabilities, you can create a standard ID photo.'."\n"
."\n"
.'## Advantages'."\n"
."\n"
.'- Hair-level precision: Achieves higher segmentation accuracy at edge details. Even individual strands of hair can be precisely segmented, making the result image look natural and difficult to identify as processed.'."\n"
.'- Complex background adaptation: Even when the subject is in a complex background environment, the human body can be accurately segmented from the background.'."\n"
.'- Multi-person support: Applicable to single-person, multi-person, complex background, and various body pose scenarios.'."\n"
.'- HD image support: Supports segmentation of high resolution images, up to 40 MB.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentHDBody?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentHDBody%2FSegmentHDBody1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [HD human body segmentation sample code](~~605134~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG (transparent images).'."\n"
.'- Image size: Up to 40 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 6000 × 6000 pixels. The longest side must be 6000 pixels or less.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of HD human body segmentation, see [Billing overview](~~190132~~).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the HD human body segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the Image Segmentation (imageseg) AI category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [HD human body segmentation sample code](~~605134~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of HD human body segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDBody'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentHDCommonImage' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentHDCommonImage/SegmentHDCommonImage1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'EC994171-7964-44B3-85AF-A715CB56747D', 'title' => ''],
'Data' => [
'description' => 'The returned result data.'."\n"
.'This data is obtained after the asynchronous task executes successfully by invoking the [GetAsyncJobResult](~~607824~~) operation and performing JSON deserialization on the Result field.',
'type' => 'object',
'properties' => [
'ImageUrl' => ['description' => 'The URL of the result image.'."\n"
.'After segmentation, a four-channel PNG image is returned without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_commoditysegmenter/2020-10-27/invi_commoditysegmenter_016037842193171000000_5pn2QM.png?Expires=1603786019&OSSAccessKeyId=LTAI****************&Signature=HwUztguGBYXmXGEmuTh%2FL3ztoh****', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['description' => 'The message returned after the asynchronous task is submitted.', 'type' => 'string', 'example' => '该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable. '],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"EC994171-7964-44B3-85AF-A715CB56747D\\",\\n \\"Data\\": {\\n \\"ImageUrl\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_commoditysegmenter/2020-10-27/invi_commoditysegmenter_016037842193171000000_5pn2QM.png?Expires=1603786019&OSSAccessKeyId=LTAI****************&Signature=HwUztguGBYXmXGEmuTh%2FL3ztoh****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]',
'title' => 'HD common image segmentation',
'summary' => 'This topic describes the syntax and provides examples of the SegmentHDCommonImage operation for HD common image segmentation.',
'description' => '## Feature description'."\n"
.'The HD common image segmentation feature segments the subject in an image and outputs a corresponding transparent image in PNG format.'."\n"
."\n"
.'>- Compared with common segmentation, HD common image segmentation supports images with a resolution of up to 10,000 × 10,000 pixels, whereas common segmentation supports images with a resolution of up to only 2,000 × 2,000 pixels. Use HD common image segmentation for high-resolution images.'."\n"
.'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHDCommonImage) to experience this feature or purchase it online.'."\n"
.'- To get help with API integration, usage, or other questions about the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
.'2. Activate the feature: Make sure that you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentHDCommonImage?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageUrl%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentHDCommonImage%2FSegmentHDCommonImage1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in common programming languages, see [HD common image segmentation sample code](~~605128~~). For sample code for querying asynchronous task results, see [Query asynchronous task results sample code](~~607974~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: PNG, JPEG, JPG, or BMP.'."\n"
.'- Image size: up to 40 MB.'."\n"
.'- Image resolution: greater than 32 × 32 pixels and less than 10,000 × 10,000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of HD common image segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHDCommonImage).'."\n"
."\n"
.'## Call procedure'."\n"
.'This is an asynchronous operation that requires two steps.'."\n"
.'Step 1: Call the SegmentHDCommonImage operation to submit a task. If the request is successful, a task ID is returned.'."\n"
.'Step 2: Call the [GetAsyncJobResult](~~607824~~) operation to query the result based on the task ID. If the task is still being processed, wait a moment and then query again. Do not submit duplicate tasks while the same task is still being processed.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## Query results'."\n"
.'This is an asynchronous operation that does not return the actual result. You must call the GetAsyncJobResult operation with the returned RequestId to obtain the actual result. For more information, see [GetAsyncJobResult](~~607824~~).'."\n"
."\n"
.'## SDK reference'."\n"
.'We recommend that you use an SDK to call the HD common image segmentation feature under the Visual AI Image Segmentation category. Multiple programming languages are supported. When calling this operation, select the SDK package for the Image Segmentation (imageseg) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in common programming languages, see [HD common image segmentation sample code](~~605128~~). For sample code for querying asynchronous task results, see [Query asynchronous task results sample code](~~607974~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of HD common image segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-10-17T02:04:01.000Z', 'description' => 'Response parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDCommonImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDCommonImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentHDSky' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the target image for sky segmentation. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentHDSky/SegmentHDSky4.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '1173F38F-B4F4-4A07-AB2E-D490C01347E5', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the segmented image.'."\n"
.'The returned image is a four-channel PNG image without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/sky-segmentation-hd/res/1173F38F-B4F4-4A07-AB2E-D490C01347E5_0d56_20201027-061858.jpg?Expires=1603781339&OSSAccessKeyId=LTAI****************&Signature=2F8%2Bj%2FWruWOMqDezwpnJOkcNJD****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable. '],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1173F38F-B4F4-4A07-AB2E-D490C01347E5\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/sky-segmentation-hd/res/1173F38F-B4F4-4A07-AB2E-D490C01347E5_0d56_20201027-061858.jpg?Expires=1603781339&OSSAccessKeyId=LTAI****************&Signature=2F8%2Bj%2FWruWOMqDezwpnJOkcNJD****\\"\\n }\\n}","type":"json"}]',
'title' => 'HD sky segmentation',
'summary' => 'This topic describes the syntax and provides examples of SegmentHDSky.',
'description' => '## Feature description'."\n"
.'The HD sky segmentation feature performs pixel-level matting on the sky in an input image to achieve segmentation. The following examples show the results.'."\n"
.'Examples of this feature are as follows:'."\n"
."\n"
.'- Original image'."\n"
.''."\n"
."\n"
.'- HD sky segmentation result'."\n"
.''."\n"
."\n"
.'- Sky segmentation result'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHDSky) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration, usage, or consultation regarding Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'Outdoor photography: When the sky in your outdoor photos is not blue or clear enough, the HD sky segmentation feature can extract the sky from any complex scene. You can then replace it with a beautiful sky to achieve the desired visual effect.'."\n"
."\n"
.'## Advantages'."\n"
.'- Higher resolution support: HD sky segmentation can process images with a resolution of up to 5000 × 5000 pixels, making it suitable for high-quality post-processing in commercial photography.'."\n"
.'- More details: HD sky segmentation produces finer images with more details.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure that you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentHDSky?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentHDSky%2FSegmentHDSky1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [SegmentHDSky sample code](~~605169~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: PNG, JPEG, or JPG.'."\n"
.'- Image size: up to 9.5 MB.'."\n"
.'- Image resolution: greater than 50 × 50 pixels and less than 5000 × 5000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of HD sky segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The API debugging section below is a paid feature. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHDSky).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the HD sky segmentation feature under the Alibaba Cloud Visual AI Image Segmentation category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the API, select the SDK package for the Image Segmentation (imageseg) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [SegmentHDSky sample code](~~605169~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of HD sky segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDSky'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentHair' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentHair/SegmentHair1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'D6C24839-91A7-41DA-B31F-98F08EF80CC0', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'The segmentation results of each element.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'The segmented image is returned as a four-channel PNG image without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_HeadSegmenter/2021-12-31/invi_HeadSegmenter_016409228383064285967296_iPLUXA.png?Expires=1640924638&OSSAccessKeyId=LTAI****************&Signature=wpKOqSar1bYvGmlTMryfEH2Q9I****', 'title' => ''],
'Width' => ['description' => 'The width of the result image.', 'type' => 'integer', 'format' => 'int32', 'example' => '113', 'title' => ''],
'Height' => ['description' => 'The height of the result image.', 'type' => 'integer', 'format' => 'int32', 'example' => '180', 'title' => ''],
'Y' => ['description' => 'The y-coordinate of the upper-left corner of the result image in the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '102', 'title' => ''],
'X' => ['description' => 'The x-coordinate of the upper-left corner of the result image in the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '446', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"D6C24839-91A7-41DA-B31F-98F08EF80CC0\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_HeadSegmenter/2021-12-31/invi_HeadSegmenter_016409228383064285967296_iPLUXA.png?Expires=1640924638&OSSAccessKeyId=LTAI****************&Signature=wpKOqSar1bYvGmlTMryfEH2Q9I****\\",\\n \\"Width\\": 113,\\n \\"Height\\": 180,\\n \\"Y\\": 102,\\n \\"X\\": 446\\n }\\n ]\\n }\\n}","type":"json"}]',
'title' => 'Hair segmentation',
'summary' => 'This topic describes the syntax and provides examples of the SegmentHair operation.',
'description' => '## Feature description'."\n"
.'The hair segmentation feature identifies human portraits in images, parses the portrait regions for matting, and outputs a rectangular transparent PNG image of the hair.'."\n"
."\n"
.'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHair) to experience the feature or purchase it online.'."\n"
.'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Online wig try-on: After segmenting the hair from a selfie, replace it with a wig image to preview the try-on effect, eliminating the hassle of returns after online purchases.'."\n"
.'- Hairstyle preview at salons: A stylist guides customers to take a selfie with a tablet or phone, then swaps in various hairstyles for a more intuitive preview. Customers can choose their favorite hairstyle for the stylist to create.'."\n"
."\n"
.'## Advantages'."\n"
.'Precise segmentation of hair edges: Hair edges are segmented with high precision, producing seamless image editing results.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentHair?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentHair%2FSegmentHair1.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke it.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Hair segmentation sample code](~~605130~~).'."\n"
."\n"
.'7. Direct client calls: Common client-side call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
.'- Image size: Up to 3 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of hair segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The API debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHair).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the hair segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend that you use the SDK. Multiple programming languages are supported. When making calls, select the SDK package for the Image Segmentation (imageseg) category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Hair segmentation sample code](~~605130~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of hair segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T06:07:10.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHair'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHair',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentHead' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentHead/SegmentHead1.jpg', 'title' => ''],
],
[
'name' => 'ReturnForm',
'in' => 'query',
'schema' => ['description' => 'The format of the returned image.'."\n"
."\n"
.'- If you set this parameter to `mask`, a single-channel mask is returned.'."\n"
.'- If you leave this parameter empty or set it to any value other than mask, a four-channel PNG image is returned.', 'type' => 'string', 'required' => false, 'example' => 'mask', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '89BBDA42-E1CA-426E-9A46-C703D8DBB1E2', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'The segmentation results of each element.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'A four-channel PNG image without compression is returned after segmentation, so the file size may increase.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_headsegmenter/2020-6-2/invi_headsegmenter_015910809094981099086_TAamhR.png?Expires=1591082709&OSSAccessKeyId=LTAI****************&Signature=xuUE%2FbYeB9LpR18VXawOVeutQU****', 'title' => ''],
'Width' => ['description' => 'The width of the result image.', 'type' => 'integer', 'format' => 'int32', 'example' => '116', 'title' => ''],
'Height' => ['description' => 'The height of the result image.', 'type' => 'integer', 'format' => 'int32', 'example' => '180', 'title' => ''],
'Y' => ['description' => 'The y-coordinate of the upper-left corner.', 'type' => 'integer', 'format' => 'int32', 'example' => '102', 'title' => ''],
'X' => ['description' => 'The x-coordinate of the upper-left corner.', 'type' => 'integer', 'format' => 'int32', 'example' => '445', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"89BBDA42-E1CA-426E-9A46-C703D8DBB1E2\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_headsegmenter/2020-6-2/invi_headsegmenter_015910809094981099086_TAamhR.png?Expires=1591082709&OSSAccessKeyId=LTAI****************&Signature=xuUE%2FbYeB9LpR18VXawOVeutQU****\\",\\n \\"Width\\": 116,\\n \\"Height\\": 180,\\n \\"Y\\": 102,\\n \\"X\\": 445\\n }\\n ]\\n }\\n}","type":"json"}]',
'title' => 'Head segmentation',
'summary' => 'This topic describes the syntax and provides examples of SegmentHead.',
'description' => '## Feature description'."\n"
.'The head segmentation feature identifies human heads in images, performs matting on the detected heads, and outputs transparent PNG images of the heads.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHead) to experience this feature or purchase it online.'."\n"
.'- To consult about API integration, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentHead?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentHead%2FSegmentHead1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Head segmentation sample code](~~605157~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 32 × 32 pixels and less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
.'- Images with multiple faces may cause service timeout errors. We recommend that the image contain no more than 5 faces.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of head segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentHead).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the head segmentation feature under the Vision AI Image Segmentation category. SDKs are available in multiple programming languages. Select the SDK package for the Image Segmentation (imageseg) category. File parameters support both local files and URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Head segmentation sample code](~~605157~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of head segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHead'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHead',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentSkin' => [
'summary' => 'This topic describes the syntax and provides examples of the skin segmentation feature (SegmentSkin).',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'paid', 'tenantRelevance' => 'publicInformation'],
'parameters' => [
[
'name' => 'URL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentSkin/SegmentSkin2.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA007354-6CF5-45BE-8333-E06318D848C0', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'URL' => ['description' => 'The URL of the segmentation result image.'."\n"
.'After segmentation, a four-channel PNG image is returned without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_skinsegmenter/2020-9-27/invi_skinsegmenter_016011971641871000001_wQbLq9.jpg?Expires=1601198964&OSSAccessKeyId=LTAI****************&Signature=xjKc%2BScprmB86cxtI%2B1T0R6TlE****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable. '],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA007354-6CF5-45BE-8333-E06318D848C0\\",\\n \\"Data\\": {\\n \\"URL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_skinsegmenter/2020-9-27/invi_skinsegmenter_016011971641871000001_wQbLq9.jpg?Expires=1601198964&OSSAccessKeyId=LTAI****************&Signature=xjKc%2BScprmB86cxtI%2B1T0R6TlE****\\"\\n }\\n}","type":"json"}]',
'title' => 'Skin segmentation',
'description' => '## Feature description'."\n"
.'The skin segmentation feature identifies human skin in images and segments the skin regions, outputting the corresponding mask image.'."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- This feature is available for a full free trial on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentSkin) to try this feature or purchase it online.'."\n"
.'- For questions about API integration or usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentSkin?lang=JAVA&sdkStyle=dara¶ms=%7B%22URL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentSkin%2FSegmentSkin1.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find and install the SDK package for the Image Segmentation (imageseg) category in the corresponding SDK documentation.'."\n"
.'- Modify the sample code provided in the References as needed and invoke it.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from a mini program](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: PNG (8-bit, 16-bit, and 64-bit PNG are not supported), JPEG, JPG, and BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 32 × 32 pixels and less than 2000 × 2000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of skin segmentation, see [Billing overview](~~190132~~).'."\n"
."\n"
.'> The API operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentSkin).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the skin segmentation feature under the Alibaba Cloud Visual AI Image Segmentation category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the Image Segmentation (imageseg) category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of skin segmentation, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the trial debugging are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentSkin'],
],
],
'ramActions' => [
[
'operationType' => 'none',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentSkin',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentSky' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'query',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageseg/SegmentSky/SegmentSky5.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '80E9D0A0-0330-4210-9986-CAC50C922FF0', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image.'."\n"
.'After segmentation, a four-channel PNG image is returned without compression. The image dimensions remain unchanged, but the file size increases.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/skysegmentation-2020-05-18-10-44-16-5bc8dc79f9-92b7z/2020-5-18/invi_skySegmentator_015897703560961000003_SqZLDv.png?Expires=1589772156&OSSAccessKeyId=LTAI****************&Signature=gXrzAUl%2BvIdYbQ9XKdho54MlkX****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"80E9D0A0-0330-4210-9986-CAC50C922FF0\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/skysegmentation-2020-05-18-10-44-16-5bc8dc79f9-92b7z/2020-5-18/invi_skySegmentator_015897703560961000003_SqZLDv.png?Expires=1589772156&OSSAccessKeyId=LTAI****************&Signature=gXrzAUl%2BvIdYbQ9XKdho54MlkX****\\"\\n }\\n}","type":"json"}]',
'title' => 'Sky segmentation',
'summary' => 'This topic describes the syntax and provides examples of the sky segmentation feature (SegmentSky).',
'description' => '## Feature description'."\n"
.'The sky segmentation feature identifies sky regions in an input image, separates them from the background, and returns the segmented foreground image.'."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageseg&children=SegmentSky) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration or usage of visual AI features on the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Segmentation service](https://vision.aliyun.com/imageseg). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageseg/2019-12-30/SegmentSky?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageseg%2FSegmentSky%2FSegmentSky1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find and install the SDK package for the Image Segmentation (imageseg) AI category in the corresponding SDK documentation.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: Up to 3 MB.'."\n"
.'- Image resolution: Greater than 50 × 50 pixels and less than 3000 × 3000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'The sky segmentation feature is currently in public preview and can be called for free.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the sky segmentation feature under the Alibaba Cloud Vision AI Image Segmentation category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the Image Segmentation (imageseg) AI category. The SDK supports both local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the sky segmentation feature, see [Common error codes](~~146751~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T06:07:10.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentSky'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
],
'endpoints' => [
['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'imageseg.cn-shanghai.aliyuncs.com', 'endpoint' => 'imageseg.cn-shanghai.aliyuncs.com', 'vpc' => 'imageseg-vpc.cn-shanghai.aliyuncs.com'],
],
'errorCodes' => [
['code' => 'AuthFailed', 'message' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'http_code' => 403, 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
['code' => 'ClientError.IllegalArgument', 'message' => '请检查参数,如参数值所代表的数据库是否存在', 'http_code' => 400, 'description' => ''],
['code' => 'EntityNotExist.Role', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => ''],
['code' => 'IllegalUrlParameter', 'message' => 'parameter url is illegal', 'http_code' => 400, 'description' => ''],
['code' => 'InternalError', 'message' => 'An error occurred to the algorithm service.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Algo', 'message' => 'An algorithm error occurred.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Busy', 'message' => 'Server busy.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Env', 'message' => 'Failed to initilize the environment.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Model', 'message' => 'Failed to load the model.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Process', 'message' => 'An error occurred during inference.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Remote', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Server', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
['code' => 'InternalError.Timeout', 'message' => '算法服务报错,请稍后重试', 'http_code' => 500, 'description' => ''],
['code' => 'InternalServerError', 'message' => 'A server error occurred while processing your request.', 'http_code' => 500, 'description' => ''],
['code' => 'InvalidAccessKeyId.Inactive', 'message' => 'AccessKeyId非法,请检查AccessKeyId是否被禁用,或者AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidAccessKeyId.NotFound', 'message' => 'access key not found', 'http_code' => 404, 'description' => ''],
['code' => 'InvalidAccessKeySecret', 'message' => 'AccessKeyId或AccessKeySecret填写错误,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidAction.NotFound', 'message' => '能力未找到,请检查类目与能力是否匹配,检查访问域名与能力是否匹配,关于访问域名可参考:https://help.aliyun.com/document_detail/143103.htm。SDK接入请参考:https://help.aliyun.com/document_detail/145033.html,选择合适编程语言根据实例代码作相关修改进行接入。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidApi.ForbiddenInvoke', 'message' => '调用受限,请检查您调用的能力是否为受限能力,受限能力需要在控制台https://vision.console.aliyun.com/找到相应能力申请经过审批之后才能调用。如非上述情况,请检查账号是否欠费', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidApi.NotPurchase', 'message' => 'specified api is not purchase', 'http_code' => 403, 'description' => ''],
['code' => 'InvalidApi.OutOfService', 'message' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_imageseg_public_cn#/open', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Content', 'message' => '请参考算法文档检查文件内容,更换包含符合算法要求的', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Decode', 'message' => 'Failed to decode the image.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Download', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.REGION', 'message' => '文件链接地域不对,非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Resolution', 'message' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Type', 'message' => '文件类型错误,请检查文件类型 - 请参考算法API文档,使用算法支持的文件类型', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidFile.URL', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Content', 'message' => 'Invalid content value.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Content', 'message' => 'invalid image content', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Decode', 'message' => '请检查图片是否能够正常打开', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Download', 'message' => 'Failed to download the file.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.NotFoundFace', 'message' => '图像中没找到人脸,请检查您的图像中是否包含人脸或人脸太小', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Region', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Resolution', 'message' => 'The resolution of the image or video is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Timeout', 'message' => '图片下载超时,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html。请检查OSS链接是否过期等。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Type', 'message' => '图片类型错误,请检查图片类型 - 请参考算法API文档,使用算法支持的图片类型', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImage.URL', 'message' => 'The URL format of the file is invalid or URL access has failed.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidImageType', 'message' => 'Invalid image type.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter', 'message' => 'Invalid parameter value.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.BadRequest', 'message' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.Convert', 'message' => 'Invalid convert value.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.NotFound', 'message' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.TooLarge', 'message' => 'The file size exceeds the limit.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.Transfer', 'message' => 'Invalid transfer value.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.Unsuitable', 'message' => 'Invalid unsuitable value.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidRamRole', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidResult', 'message' => '参数错误,请参考文档检查参数值,检查文件内容。请检查是否图片内容不完整或者太模糊等。', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidSide', 'message' => 'Specified parameter Side is not valid. 请参考文档填写正确的Side参数', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidTimeStamp.Expired', 'message' => 'timestamp expired', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidVersion', 'message' => 'Specified parameter Version is not valid', 'http_code' => 400, 'description' => ''],
['code' => 'MissingAccessKeyId', 'message' => 'AccessKeyId未填写,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
['code' => 'MissingFileURL', 'message' => 'FileURL is required for this operation.', 'http_code' => 400, 'description' => ''],
['code' => 'MissingImageURL', 'message' => 'ImageURL is required for this operation.', 'http_code' => 400, 'description' => ''],
['code' => 'MissingLimit', 'message' => 'Limit is required for this operation', 'http_code' => 400, 'description' => ''],
['code' => 'MissingParameter', 'message' => 'A required parameter is not specified.', 'http_code' => 400, 'description' => ''],
['code' => 'MissingTasks', 'message' => 'Tasks is required for this operation.', 'http_code' => 400, 'description' => ''],
['code' => 'ParameterError', 'message' => 'The parameter is invalid. Please check again.', 'http_code' => 400, 'description' => 'The parameter is invalid. Please check again.'],
['code' => 'ServiceUnavailable', 'message' => 'The service is unavailable.', 'http_code' => 503, 'description' => 'The service is unavailable. '],
['code' => 'SignatureDoesNotMatch', 'message' => 'signature not match', 'http_code' => 400, 'description' => ''],
['code' => 'SignatureNonceUsed', 'message' => 'signature nonce error', 'http_code' => 400, 'description' => ''],
['code' => 'Throttling', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => ''],
['code' => 'Throttling.User', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => ''],
['code' => 'Timeout', 'message' => 'The request has timed out.', 'http_code' => 408, 'description' => 'The request has timed out.'],
['code' => 'Unauthorized', 'message' => 'RAM authentication failed.', 'http_code' => 403, 'description' => ''],
],
'changeSet' => [
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'SegmentCloth'],
],
'createdAt' => '2024-07-19T02:15:05.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Request parameters changed, Response parameters changed', 'api' => 'SegmentCloth'],
],
'createdAt' => '2023-12-06T02:08:29.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'ChangeSky'],
],
'createdAt' => '2022-11-18T05:37:37.000Z',
'description' => '支持本地文件上传',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'SegmentBody'],
],
'createdAt' => '2022-11-01T05:50:12.000Z',
'description' => '设置SegmentBody的入参async为不可见',
],
[
'apis' => [
['description' => 'Response parameters changed', 'api' => 'SegmentHDCommonImage'],
],
'createdAt' => '2022-10-17T02:04:15.000Z',
'description' => '修改异步任务Message为可见',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'RefineMask'],
],
'createdAt' => '2022-09-29T08:00:16.000Z',
'description' => '多url参数支持本地文件上传',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'GetAsyncJobResult'],
],
'createdAt' => '2022-04-24T08:16:08.000Z',
'description' => '调整GetAsyncJobResult单用户调用频率',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'ParseFace'],
],
'createdAt' => '2022-03-30T09:08:48.000Z',
'description' => '调整用户调用频率',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'SegmentCloth'],
['description' => 'Error codes changed', 'api' => 'SegmentFace'],
['description' => 'Error codes changed', 'api' => 'SegmentFurniture'],
['description' => 'Error codes changed', 'api' => 'SegmentHair'],
['description' => 'Error codes changed', 'api' => 'SegmentSky'],
['description' => 'Error codes changed', 'api' => 'SegmentVehicle'],
],
'createdAt' => '2022-03-30T09:08:05.000Z',
'description' => '调整单用户调用频率',
],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentBody'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDSky'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHair'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentSky'],
['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHead'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentFood'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDCommonImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RefineMask'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentSkin'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCommonImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ParseFace'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCommodity'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentHDBody'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentCloth'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeSky'],
],
],
'ram' => [
'productCode' => 'VisualIntelligenceAPI',
'productName' => 'Visual Intelligence API',
'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'],
'ramLevel' => 'SERVICE',
'ramConditions' => [],
'ramActions' => [
[
'apiName' => 'SegmentHDSky',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'GetAsyncJobResult',
'description' => '',
'operationType' => 'get',
'ramAction' => [
'action' => 'viapi-imageseg:GetAsyncJobResult',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentCloth',
'description' => '',
'operationType' => 'none',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCloth',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentHDBody',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ParseFace',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:ParseFace',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentFood',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentFood',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentHair',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHair',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ChangeSky',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'viapi-imageseg:ChangeSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentSkin',
'description' => '',
'operationType' => 'none',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentSkin',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentBody',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RefineMask',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:RefineMask',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentHead',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHead',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentCommonImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCommonImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentSky',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentSky',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentCommodity',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentCommodity',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentHDCommonImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageseg:SegmentHDCommonImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
'resourceTypes' => [],
],
];
|