lapa.py 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. dataset_info = dict(
  2. dataset_name='lapa',
  3. paper_info=dict(
  4. author='Liu, Yinglu and Shi, Hailin and Shen, Hao and Si, '
  5. 'Yue and Wang, Xiaobo and Mei, Tao',
  6. title='A New Dataset and Boundary-Attention Semantic '
  7. 'Segmentation for Face Parsing.',
  8. container='Proceedings of the AAAI Conference on '
  9. 'Artificial Intelligence 2020',
  10. year='2020',
  11. homepage='https://github.com/JDAI-CV/lapa-dataset',
  12. ),
  13. keypoint_info={
  14. 0:
  15. dict(
  16. name='kpt-0', id=0, color=[255, 0, 0], type='upper',
  17. swap='kpt-32'),
  18. 1:
  19. dict(
  20. name='kpt-1', id=1, color=[255, 0, 0], type='upper',
  21. swap='kpt-31'),
  22. 2:
  23. dict(
  24. name='kpt-2', id=2, color=[255, 0, 0], type='upper',
  25. swap='kpt-30'),
  26. 3:
  27. dict(
  28. name='kpt-3', id=3, color=[255, 0, 0], type='lower',
  29. swap='kpt-29'),
  30. 4:
  31. dict(
  32. name='kpt-4', id=4, color=[255, 0, 0], type='lower',
  33. swap='kpt-28'),
  34. 5:
  35. dict(
  36. name='kpt-5', id=5, color=[255, 0, 0], type='lower',
  37. swap='kpt-27'),
  38. 6:
  39. dict(
  40. name='kpt-6', id=6, color=[255, 0, 0], type='lower',
  41. swap='kpt-26'),
  42. 7:
  43. dict(
  44. name='kpt-7', id=7, color=[255, 0, 0], type='lower',
  45. swap='kpt-25'),
  46. 8:
  47. dict(
  48. name='kpt-8', id=8, color=[255, 0, 0], type='lower',
  49. swap='kpt-24'),
  50. 9:
  51. dict(
  52. name='kpt-9', id=9, color=[255, 0, 0], type='lower',
  53. swap='kpt-23'),
  54. 10:
  55. dict(
  56. name='kpt-10',
  57. id=10,
  58. color=[255, 0, 0],
  59. type='lower',
  60. swap='kpt-22'),
  61. 11:
  62. dict(
  63. name='kpt-11',
  64. id=11,
  65. color=[255, 0, 0],
  66. type='lower',
  67. swap='kpt-21'),
  68. 12:
  69. dict(
  70. name='kpt-12',
  71. id=12,
  72. color=[255, 0, 0],
  73. type='lower',
  74. swap='kpt-20'),
  75. 13:
  76. dict(
  77. name='kpt-13',
  78. id=13,
  79. color=[255, 0, 0],
  80. type='lower',
  81. swap='kpt-19'),
  82. 14:
  83. dict(
  84. name='kpt-14',
  85. id=14,
  86. color=[255, 0, 0],
  87. type='lower',
  88. swap='kpt-18'),
  89. 15:
  90. dict(
  91. name='kpt-15',
  92. id=15,
  93. color=[255, 0, 0],
  94. type='lower',
  95. swap='kpt-17'),
  96. 16:
  97. dict(name='kpt-16', id=16, color=[255, 0, 0], type='lower', swap=''),
  98. 17:
  99. dict(
  100. name='kpt-17',
  101. id=17,
  102. color=[255, 0, 0],
  103. type='lower',
  104. swap='kpt-15'),
  105. 18:
  106. dict(
  107. name='kpt-18',
  108. id=18,
  109. color=[255, 0, 0],
  110. type='lower',
  111. swap='kpt-14'),
  112. 19:
  113. dict(
  114. name='kpt-19',
  115. id=19,
  116. color=[255, 0, 0],
  117. type='lower',
  118. swap='kpt-13'),
  119. 20:
  120. dict(
  121. name='kpt-20',
  122. id=20,
  123. color=[255, 0, 0],
  124. type='lower',
  125. swap='kpt-12'),
  126. 21:
  127. dict(
  128. name='kpt-21',
  129. id=21,
  130. color=[255, 0, 0],
  131. type='lower',
  132. swap='kpt-11'),
  133. 22:
  134. dict(
  135. name='kpt-22',
  136. id=22,
  137. color=[255, 0, 0],
  138. type='lower',
  139. swap='kpt-10'),
  140. 23:
  141. dict(
  142. name='kpt-23',
  143. id=23,
  144. color=[255, 0, 0],
  145. type='lower',
  146. swap='kpt-9'),
  147. 24:
  148. dict(
  149. name='kpt-24',
  150. id=24,
  151. color=[255, 0, 0],
  152. type='lower',
  153. swap='kpt-8'),
  154. 25:
  155. dict(
  156. name='kpt-25',
  157. id=25,
  158. color=[255, 0, 0],
  159. type='lower',
  160. swap='kpt-7'),
  161. 26:
  162. dict(
  163. name='kpt-26',
  164. id=26,
  165. color=[255, 0, 0],
  166. type='lower',
  167. swap='kpt-6'),
  168. 27:
  169. dict(
  170. name='kpt-27',
  171. id=27,
  172. color=[255, 0, 0],
  173. type='lower',
  174. swap='kpt-5'),
  175. 28:
  176. dict(
  177. name='kpt-28',
  178. id=28,
  179. color=[255, 0, 0],
  180. type='lower',
  181. swap='kpt-4'),
  182. 29:
  183. dict(
  184. name='kpt-29',
  185. id=29,
  186. color=[255, 0, 0],
  187. type='lower',
  188. swap='kpt-3'),
  189. 30:
  190. dict(
  191. name='kpt-30',
  192. id=30,
  193. color=[255, 0, 0],
  194. type='upper',
  195. swap='kpt-2'),
  196. 31:
  197. dict(
  198. name='kpt-31',
  199. id=31,
  200. color=[255, 0, 0],
  201. type='upper',
  202. swap='kpt-1'),
  203. 32:
  204. dict(
  205. name='kpt-32',
  206. id=32,
  207. color=[255, 0, 0],
  208. type='upper',
  209. swap='kpt-0'),
  210. 33:
  211. dict(
  212. name='kpt-33',
  213. id=33,
  214. color=[255, 0, 0],
  215. type='upper',
  216. swap='kpt-46'),
  217. 34:
  218. dict(
  219. name='kpt-34',
  220. id=34,
  221. color=[255, 0, 0],
  222. type='upper',
  223. swap='kpt-45'),
  224. 35:
  225. dict(
  226. name='kpt-35',
  227. id=35,
  228. color=[255, 0, 0],
  229. type='upper',
  230. swap='kpt-44'),
  231. 36:
  232. dict(
  233. name='kpt-36',
  234. id=36,
  235. color=[255, 0, 0],
  236. type='upper',
  237. swap='kpt-43'),
  238. 37:
  239. dict(
  240. name='kpt-37',
  241. id=37,
  242. color=[255, 0, 0],
  243. type='upper',
  244. swap='kpt-42'),
  245. 38:
  246. dict(
  247. name='kpt-38',
  248. id=38,
  249. color=[255, 0, 0],
  250. type='upper',
  251. swap='kpt-50'),
  252. 39:
  253. dict(
  254. name='kpt-39',
  255. id=39,
  256. color=[255, 0, 0],
  257. type='upper',
  258. swap='kpt-49'),
  259. 40:
  260. dict(
  261. name='kpt-40',
  262. id=40,
  263. color=[255, 0, 0],
  264. type='upper',
  265. swap='kpt-48'),
  266. 41:
  267. dict(
  268. name='kpt-41',
  269. id=41,
  270. color=[255, 0, 0],
  271. type='upper',
  272. swap='kpt-47'),
  273. 42:
  274. dict(
  275. name='kpt-42',
  276. id=42,
  277. color=[255, 0, 0],
  278. type='upper',
  279. swap='kpt-37'),
  280. 43:
  281. dict(
  282. name='kpt-43',
  283. id=43,
  284. color=[255, 0, 0],
  285. type='upper',
  286. swap='kpt-36'),
  287. 44:
  288. dict(
  289. name='kpt-44',
  290. id=44,
  291. color=[255, 0, 0],
  292. type='upper',
  293. swap='kpt-35'),
  294. 45:
  295. dict(
  296. name='kpt-45',
  297. id=45,
  298. color=[255, 0, 0],
  299. type='upper',
  300. swap='kpt-34'),
  301. 46:
  302. dict(
  303. name='kpt-46',
  304. id=46,
  305. color=[255, 0, 0],
  306. type='upper',
  307. swap='kpt-33'),
  308. 47:
  309. dict(
  310. name='kpt-47',
  311. id=47,
  312. color=[255, 0, 0],
  313. type='upper',
  314. swap='kpt-41'),
  315. 48:
  316. dict(
  317. name='kpt-48',
  318. id=48,
  319. color=[255, 0, 0],
  320. type='upper',
  321. swap='kpt-40'),
  322. 49:
  323. dict(
  324. name='kpt-49',
  325. id=49,
  326. color=[255, 0, 0],
  327. type='upper',
  328. swap='kpt-39'),
  329. 50:
  330. dict(
  331. name='kpt-50',
  332. id=50,
  333. color=[255, 0, 0],
  334. type='upper',
  335. swap='kpt-38'),
  336. 51:
  337. dict(name='kpt-51', id=51, color=[255, 0, 0], type='upper', swap=''),
  338. 52:
  339. dict(name='kpt-52', id=52, color=[255, 0, 0], type='upper', swap=''),
  340. 53:
  341. dict(name='kpt-53', id=53, color=[255, 0, 0], type='lower', swap=''),
  342. 54:
  343. dict(name='kpt-54', id=54, color=[255, 0, 0], type='lower', swap=''),
  344. 55:
  345. dict(
  346. name='kpt-55',
  347. id=55,
  348. color=[255, 0, 0],
  349. type='upper',
  350. swap='kpt-65'),
  351. 56:
  352. dict(
  353. name='kpt-56',
  354. id=56,
  355. color=[255, 0, 0],
  356. type='lower',
  357. swap='kpt-64'),
  358. 57:
  359. dict(
  360. name='kpt-57',
  361. id=57,
  362. color=[255, 0, 0],
  363. type='lower',
  364. swap='kpt-63'),
  365. 58:
  366. dict(
  367. name='kpt-58',
  368. id=58,
  369. color=[255, 0, 0],
  370. type='lower',
  371. swap='kpt-62'),
  372. 59:
  373. dict(
  374. name='kpt-59',
  375. id=59,
  376. color=[255, 0, 0],
  377. type='lower',
  378. swap='kpt-61'),
  379. 60:
  380. dict(name='kpt-60', id=60, color=[255, 0, 0], type='lower', swap=''),
  381. 61:
  382. dict(
  383. name='kpt-61',
  384. id=61,
  385. color=[255, 0, 0],
  386. type='lower',
  387. swap='kpt-59'),
  388. 62:
  389. dict(
  390. name='kpt-62',
  391. id=62,
  392. color=[255, 0, 0],
  393. type='lower',
  394. swap='kpt-58'),
  395. 63:
  396. dict(
  397. name='kpt-63',
  398. id=63,
  399. color=[255, 0, 0],
  400. type='lower',
  401. swap='kpt-57'),
  402. 64:
  403. dict(
  404. name='kpt-64',
  405. id=64,
  406. color=[255, 0, 0],
  407. type='lower',
  408. swap='kpt-56'),
  409. 65:
  410. dict(
  411. name='kpt-65',
  412. id=65,
  413. color=[255, 0, 0],
  414. type='upper',
  415. swap='kpt-55'),
  416. 66:
  417. dict(
  418. name='kpt-66',
  419. id=66,
  420. color=[255, 0, 0],
  421. type='upper',
  422. swap='kpt-79'),
  423. 67:
  424. dict(
  425. name='kpt-67',
  426. id=67,
  427. color=[255, 0, 0],
  428. type='upper',
  429. swap='kpt-78'),
  430. 68:
  431. dict(
  432. name='kpt-68',
  433. id=68,
  434. color=[255, 0, 0],
  435. type='upper',
  436. swap='kpt-77'),
  437. 69:
  438. dict(
  439. name='kpt-69',
  440. id=69,
  441. color=[255, 0, 0],
  442. type='upper',
  443. swap='kpt-76'),
  444. 70:
  445. dict(
  446. name='kpt-70',
  447. id=70,
  448. color=[255, 0, 0],
  449. type='upper',
  450. swap='kpt-75'),
  451. 71:
  452. dict(
  453. name='kpt-71',
  454. id=71,
  455. color=[255, 0, 0],
  456. type='upper',
  457. swap='kpt-82'),
  458. 72:
  459. dict(
  460. name='kpt-72',
  461. id=72,
  462. color=[255, 0, 0],
  463. type='upper',
  464. swap='kpt-81'),
  465. 73:
  466. dict(
  467. name='kpt-73',
  468. id=73,
  469. color=[255, 0, 0],
  470. type='upper',
  471. swap='kpt-80'),
  472. 74:
  473. dict(
  474. name='kpt-74',
  475. id=74,
  476. color=[255, 0, 0],
  477. type='upper',
  478. swap='kpt-83'),
  479. 75:
  480. dict(
  481. name='kpt-75',
  482. id=75,
  483. color=[255, 0, 0],
  484. type='upper',
  485. swap='kpt-70'),
  486. 76:
  487. dict(
  488. name='kpt-76',
  489. id=76,
  490. color=[255, 0, 0],
  491. type='upper',
  492. swap='kpt-69'),
  493. 77:
  494. dict(
  495. name='kpt-77',
  496. id=77,
  497. color=[255, 0, 0],
  498. type='upper',
  499. swap='kpt-68'),
  500. 78:
  501. dict(
  502. name='kpt-78',
  503. id=78,
  504. color=[255, 0, 0],
  505. type='upper',
  506. swap='kpt-67'),
  507. 79:
  508. dict(
  509. name='kpt-79',
  510. id=79,
  511. color=[255, 0, 0],
  512. type='upper',
  513. swap='kpt-66'),
  514. 80:
  515. dict(
  516. name='kpt-80',
  517. id=80,
  518. color=[255, 0, 0],
  519. type='upper',
  520. swap='kpt-73'),
  521. 81:
  522. dict(
  523. name='kpt-81',
  524. id=81,
  525. color=[255, 0, 0],
  526. type='upper',
  527. swap='kpt-72'),
  528. 82:
  529. dict(
  530. name='kpt-82',
  531. id=82,
  532. color=[255, 0, 0],
  533. type='upper',
  534. swap='kpt-71'),
  535. 83:
  536. dict(
  537. name='kpt-83',
  538. id=83,
  539. color=[255, 0, 0],
  540. type='upper',
  541. swap='kpt-74'),
  542. 84:
  543. dict(
  544. name='kpt-84',
  545. id=84,
  546. color=[255, 0, 0],
  547. type='lower',
  548. swap='kpt-90'),
  549. 85:
  550. dict(
  551. name='kpt-85',
  552. id=85,
  553. color=[255, 0, 0],
  554. type='lower',
  555. swap='kpt-89'),
  556. 86:
  557. dict(
  558. name='kpt-86',
  559. id=86,
  560. color=[255, 0, 0],
  561. type='lower',
  562. swap='kpt-88'),
  563. 87:
  564. dict(name='kpt-87', id=87, color=[255, 0, 0], type='lower', swap=''),
  565. 88:
  566. dict(
  567. name='kpt-88',
  568. id=88,
  569. color=[255, 0, 0],
  570. type='lower',
  571. swap='kpt-86'),
  572. 89:
  573. dict(
  574. name='kpt-89',
  575. id=89,
  576. color=[255, 0, 0],
  577. type='lower',
  578. swap='kpt-85'),
  579. 90:
  580. dict(
  581. name='kpt-90',
  582. id=90,
  583. color=[255, 0, 0],
  584. type='lower',
  585. swap='kpt-84'),
  586. 91:
  587. dict(
  588. name='kpt-91',
  589. id=91,
  590. color=[255, 0, 0],
  591. type='lower',
  592. swap='kpt-95'),
  593. 92:
  594. dict(
  595. name='kpt-92',
  596. id=92,
  597. color=[255, 0, 0],
  598. type='lower',
  599. swap='kpt-94'),
  600. 93:
  601. dict(name='kpt-93', id=93, color=[255, 0, 0], type='lower', swap=''),
  602. 94:
  603. dict(
  604. name='kpt-94',
  605. id=94,
  606. color=[255, 0, 0],
  607. type='lower',
  608. swap='kpt-92'),
  609. 95:
  610. dict(
  611. name='kpt-95',
  612. id=95,
  613. color=[255, 0, 0],
  614. type='lower',
  615. swap='kpt-91'),
  616. 96:
  617. dict(
  618. name='kpt-96',
  619. id=96,
  620. color=[255, 0, 0],
  621. type='lower',
  622. swap='kpt-100'),
  623. 97:
  624. dict(
  625. name='kpt-97',
  626. id=97,
  627. color=[255, 0, 0],
  628. type='lower',
  629. swap='kpt-99'),
  630. 98:
  631. dict(name='kpt-98', id=98, color=[255, 0, 0], type='lower', swap=''),
  632. 99:
  633. dict(
  634. name='kpt-99',
  635. id=99,
  636. color=[255, 0, 0],
  637. type='lower',
  638. swap='kpt-97'),
  639. 100:
  640. dict(
  641. name='kpt-100',
  642. id=100,
  643. color=[255, 0, 0],
  644. type='lower',
  645. swap='kpt-96'),
  646. 101:
  647. dict(
  648. name='kpt-101',
  649. id=101,
  650. color=[255, 0, 0],
  651. type='lower',
  652. swap='kpt-103'),
  653. 102:
  654. dict(name='kpt-102', id=102, color=[255, 0, 0], type='lower', swap=''),
  655. 103:
  656. dict(
  657. name='kpt-103',
  658. id=103,
  659. color=[255, 0, 0],
  660. type='lower',
  661. swap='kpt-101'),
  662. 104:
  663. dict(
  664. name='kpt-104',
  665. id=104,
  666. color=[255, 0, 0],
  667. type='upper',
  668. swap='kpt-105'),
  669. 105:
  670. dict(
  671. name='kpt-105',
  672. id=105,
  673. color=[255, 0, 0],
  674. type='upper',
  675. swap='kpt-104')
  676. },
  677. skeleton_info={},
  678. joint_weights=[
  679. 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8,
  680. 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8,
  681. 0.8, 0.8, 0.8, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
  682. 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
  683. 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0,
  684. 2.0, 2.0, 2.0, 2.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0,
  685. 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5,
  686. 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0, 1.0
  687. ],
  688. sigmas=[])