register.py 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. # copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import os
  15. import os.path as osp
  16. from pathlib import Path
  17. from ...base.register import register_model_info, register_suite_info
  18. from .model import DetModel
  19. from .config import DetConfig
  20. from .runner import DetRunner
  21. REPO_ROOT_PATH = os.environ.get("PADDLE_PDX_PADDLEDETECTION_PATH")
  22. PDX_CONFIG_DIR = osp.abspath(osp.join(osp.dirname(__file__), "..", "configs"))
  23. HPI_CONFIG_DIR = Path(__file__).parent.parent.parent.parent / "utils" / "hpi_configs"
  24. register_suite_info(
  25. {
  26. "suite_name": "Det",
  27. "model": DetModel,
  28. "runner": DetRunner,
  29. "config": DetConfig,
  30. "runner_root_path": REPO_ROOT_PATH,
  31. }
  32. )
  33. ################ Models Using Universal Config ################
  34. register_model_info(
  35. {
  36. "model_name": "PicoDet-S",
  37. "suite": "Det",
  38. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-S.yaml"),
  39. "auto_compression_config_path": osp.join(
  40. PDX_CONFIG_DIR, "slim", "picodet_s_lcnet_qat.yml"
  41. ),
  42. "supported_apis": ["train", "evaluate", "predict", "export", "compression"],
  43. "supported_dataset_types": ["COCODetDataset"],
  44. "hpi_config_path": HPI_CONFIG_DIR / "PicoDet-S.yaml",
  45. }
  46. )
  47. register_model_info(
  48. {
  49. "model_name": "PicoDet-L",
  50. "suite": "Det",
  51. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-L.yaml"),
  52. "auto_compression_config_path": osp.join(
  53. PDX_CONFIG_DIR, "slim", "picodet_l_lcnet_qat.yml"
  54. ),
  55. "supported_apis": ["train", "evaluate", "predict", "export", "compression"],
  56. "supported_dataset_types": ["COCODetDataset"],
  57. "hpi_config_path": HPI_CONFIG_DIR / "PicoDet-L.yaml",
  58. }
  59. )
  60. register_model_info(
  61. {
  62. "model_name": "PP-YOLOE_plus-S",
  63. "suite": "Det",
  64. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus-S.yaml"),
  65. "auto_compression_config_path": osp.join(
  66. PDX_CONFIG_DIR, "slim", "ppyoloe_plus_crn_s_qat.yml"
  67. ),
  68. "supported_apis": ["train", "evaluate", "predict", "export", "compression"],
  69. "supported_dataset_types": ["COCODetDataset"],
  70. "supported_train_opts": {
  71. "device": ["cpu", "gpu_nxcx"],
  72. "dy2st": False,
  73. "amp": ["O1", "O2"],
  74. },
  75. "hpi_config_path": HPI_CONFIG_DIR / "PP-YOLOE_plus-S.yaml",
  76. }
  77. )
  78. register_model_info(
  79. {
  80. "model_name": "PP-YOLOE_plus-M",
  81. "suite": "Det",
  82. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus-M.yaml"),
  83. "auto_compression_config_path": osp.join(
  84. PDX_CONFIG_DIR, "slim", "ppyoloe_plus_crn_l_qat.yml"
  85. ),
  86. "supported_apis": ["train", "evaluate", "predict", "export", "compression"],
  87. "supported_dataset_types": ["COCODetDataset"],
  88. "supported_train_opts": {
  89. "device": ["cpu", "gpu_nxcx"],
  90. "dy2st": False,
  91. "amp": ["O1", "O2"],
  92. },
  93. "hpi_config_path": HPI_CONFIG_DIR / "PP-YOLOE_plus-M.yaml",
  94. }
  95. )
  96. register_model_info(
  97. {
  98. "model_name": "PP-YOLOE_plus-L",
  99. "suite": "Det",
  100. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus-L.yaml"),
  101. "supported_apis": ["train", "evaluate", "predict", "export"],
  102. "supported_dataset_types": ["COCODetDataset"],
  103. "supported_train_opts": {
  104. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  105. "dy2st": False,
  106. "amp": ["O1", "O2"],
  107. },
  108. "hpi_config_path": HPI_CONFIG_DIR / "PP-YOLOE_plus-L.yaml",
  109. }
  110. )
  111. register_model_info(
  112. {
  113. "model_name": "PP-YOLOE_plus-X",
  114. "suite": "Det",
  115. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus-X.yaml"),
  116. "supported_apis": ["train", "evaluate", "predict", "export"],
  117. "supported_dataset_types": ["COCODetDataset"],
  118. "supported_train_opts": {
  119. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  120. "dy2st": False,
  121. "amp": ["O1", "O2"],
  122. },
  123. "hpi_config_path": HPI_CONFIG_DIR / "PP-YOLOE_plus-X.yaml",
  124. }
  125. )
  126. register_model_info(
  127. {
  128. "model_name": "RT-DETR-L",
  129. "suite": "Det",
  130. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-L.yaml"),
  131. "supported_apis": ["train", "evaluate", "predict", "export"],
  132. "supported_dataset_types": ["COCODetDataset"],
  133. "supported_train_opts": {
  134. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  135. "dy2st": False,
  136. "amp": ["OFF"],
  137. },
  138. "hpi_config_path": HPI_CONFIG_DIR / "RT-DETR-L.yaml",
  139. }
  140. )
  141. register_model_info(
  142. {
  143. "model_name": "RT-DETR-H",
  144. "suite": "Det",
  145. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-H.yaml"),
  146. "supported_apis": ["train", "evaluate", "predict", "export"],
  147. "supported_dataset_types": ["COCODetDataset"],
  148. "supported_train_opts": {
  149. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  150. "dy2st": False,
  151. "amp": ["OFF"],
  152. },
  153. "hpi_config_path": HPI_CONFIG_DIR / "RT-DETR-H.yaml",
  154. }
  155. )
  156. register_model_info(
  157. {
  158. "model_name": "RT-DETR-X",
  159. "suite": "Det",
  160. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-X.yaml"),
  161. "supported_apis": ["train", "evaluate", "predict", "export"],
  162. "supported_dataset_types": ["COCODetDataset"],
  163. "supported_train_opts": {
  164. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  165. "dy2st": False,
  166. "amp": ["OFF"],
  167. },
  168. "hpi_config_path": HPI_CONFIG_DIR / "RT-DETR-X.yaml",
  169. }
  170. )
  171. register_model_info(
  172. {
  173. "model_name": "RT-DETR-R18",
  174. "suite": "Det",
  175. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-R18.yaml"),
  176. "supported_apis": ["train", "evaluate", "predict", "export"],
  177. "supported_dataset_types": ["COCODetDataset"],
  178. "supported_train_opts": {
  179. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  180. "dy2st": False,
  181. "amp": ["OFF"],
  182. },
  183. "hpi_config_path": HPI_CONFIG_DIR / "RT-DETR-R18.yaml",
  184. }
  185. )
  186. register_model_info(
  187. {
  188. "model_name": "RT-DETR-R50",
  189. "suite": "Det",
  190. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-R50.yaml"),
  191. "supported_apis": ["train", "evaluate", "predict", "export"],
  192. "supported_dataset_types": ["COCODetDataset"],
  193. "supported_train_opts": {
  194. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  195. "dy2st": False,
  196. "amp": ["OFF"],
  197. },
  198. "hpi_config_path": HPI_CONFIG_DIR / "RT-DETR-R50.yaml",
  199. }
  200. )
  201. register_model_info(
  202. {
  203. "model_name": "PicoDet_layout_1x",
  204. "suite": "Det",
  205. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet_layout_1x.yaml"),
  206. "supported_apis": ["train", "evaluate", "predict", "export"],
  207. "supported_dataset_types": ["COCODetDataset"],
  208. "supported_train_opts": {
  209. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  210. "dy2st": False,
  211. "amp": ["OFF"],
  212. },
  213. "hpi_config_path": HPI_CONFIG_DIR / "PicoDet_layout_1x.yaml",
  214. }
  215. )
  216. register_model_info(
  217. {
  218. "model_name": "YOLOv3-DarkNet53",
  219. "suite": "Det",
  220. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOv3-DarkNet53.yaml"),
  221. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  222. "supported_dataset_types": ["COCODetDataset"],
  223. "supported_train_opts": {
  224. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  225. "dy2st": False,
  226. "amp": ["OFF"],
  227. },
  228. "hpi_config_path": HPI_CONFIG_DIR / "YOLOv3-DarkNet53.yaml",
  229. }
  230. )
  231. register_model_info(
  232. {
  233. "model_name": "YOLOv3-MobileNetV3",
  234. "suite": "Det",
  235. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOv3-MobileNetV3.yaml"),
  236. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  237. "supported_dataset_types": ["COCODetDataset"],
  238. "supported_train_opts": {
  239. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  240. "dy2st": False,
  241. "amp": ["OFF"],
  242. },
  243. "hpi_config_path": HPI_CONFIG_DIR / "YOLOv3-MobileNetV3.yaml",
  244. }
  245. )
  246. register_model_info(
  247. {
  248. "model_name": "YOLOv3-ResNet50_vd_DCN",
  249. "suite": "Det",
  250. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOv3-ResNet50_vd_DCN.yaml"),
  251. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  252. "supported_dataset_types": ["COCODetDataset"],
  253. "supported_train_opts": {
  254. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  255. "dy2st": False,
  256. "amp": ["OFF"],
  257. },
  258. "hpi_config_path": HPI_CONFIG_DIR / "YOLOv3-ResNet50_vd_DCN.yaml",
  259. }
  260. )
  261. register_model_info(
  262. {
  263. "model_name": "YOLOX-L",
  264. "suite": "Det",
  265. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-L.yaml"),
  266. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  267. "supported_dataset_types": ["COCODetDataset"],
  268. "supported_train_opts": {
  269. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  270. "dy2st": False,
  271. "amp": ["OFF"],
  272. },
  273. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-L.yaml",
  274. }
  275. )
  276. register_model_info(
  277. {
  278. "model_name": "YOLOX-M",
  279. "suite": "Det",
  280. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-M.yaml"),
  281. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  282. "supported_dataset_types": ["COCODetDataset"],
  283. "supported_train_opts": {
  284. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  285. "dy2st": False,
  286. "amp": ["OFF"],
  287. },
  288. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-M.yaml",
  289. }
  290. )
  291. register_model_info(
  292. {
  293. "model_name": "YOLOX-N",
  294. "suite": "Det",
  295. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-N.yaml"),
  296. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  297. "supported_dataset_types": ["COCODetDataset"],
  298. "supported_train_opts": {
  299. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  300. "dy2st": False,
  301. "amp": ["OFF"],
  302. },
  303. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-N.yaml",
  304. }
  305. )
  306. register_model_info(
  307. {
  308. "model_name": "YOLOX-S",
  309. "suite": "Det",
  310. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-S.yaml"),
  311. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  312. "supported_dataset_types": ["COCODetDataset"],
  313. "supported_train_opts": {
  314. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  315. "dy2st": False,
  316. "amp": ["OFF"],
  317. },
  318. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-S.yaml",
  319. }
  320. )
  321. register_model_info(
  322. {
  323. "model_name": "YOLOX-T",
  324. "suite": "Det",
  325. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-T.yaml"),
  326. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  327. "supported_dataset_types": ["COCODetDataset"],
  328. "supported_train_opts": {
  329. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  330. "dy2st": False,
  331. "amp": ["OFF"],
  332. },
  333. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-T.yaml",
  334. }
  335. )
  336. register_model_info(
  337. {
  338. "model_name": "YOLOX-X",
  339. "suite": "Det",
  340. "config_path": osp.join(PDX_CONFIG_DIR, "YOLOX-X.yaml"),
  341. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  342. "supported_dataset_types": ["COCODetDataset"],
  343. "supported_train_opts": {
  344. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  345. "dy2st": False,
  346. "amp": ["OFF"],
  347. },
  348. "hpi_config_path": HPI_CONFIG_DIR / "YOLOX-X.yaml",
  349. }
  350. )
  351. register_model_info(
  352. {
  353. "model_name": "FasterRCNN-ResNet34-FPN",
  354. "suite": "Det",
  355. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet34-FPN.yaml"),
  356. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  357. "supported_dataset_types": ["COCODetDataset"],
  358. "supported_train_opts": {
  359. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  360. "dy2st": False,
  361. "amp": ["OFF"],
  362. },
  363. }
  364. )
  365. register_model_info(
  366. {
  367. "model_name": "FasterRCNN-ResNet50",
  368. "suite": "Det",
  369. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet50.yaml"),
  370. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  371. "supported_dataset_types": ["COCODetDataset"],
  372. "supported_train_opts": {
  373. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  374. "dy2st": False,
  375. "amp": ["OFF"],
  376. },
  377. }
  378. )
  379. register_model_info(
  380. {
  381. "model_name": "FasterRCNN-ResNet50-FPN",
  382. "suite": "Det",
  383. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet50-FPN.yaml"),
  384. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  385. "supported_dataset_types": ["COCODetDataset"],
  386. "supported_train_opts": {
  387. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  388. "dy2st": False,
  389. "amp": ["OFF"],
  390. },
  391. }
  392. )
  393. register_model_info(
  394. {
  395. "model_name": "FasterRCNN-ResNet50-vd-FPN",
  396. "suite": "Det",
  397. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet50-vd-FPN.yaml"),
  398. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  399. "supported_dataset_types": ["COCODetDataset"],
  400. "supported_train_opts": {
  401. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  402. "dy2st": False,
  403. "amp": ["OFF"],
  404. },
  405. }
  406. )
  407. register_model_info(
  408. {
  409. "model_name": "FasterRCNN-ResNet50-vd-SSLDv2-FPN",
  410. "suite": "Det",
  411. "config_path": osp.join(
  412. PDX_CONFIG_DIR, "FasterRCNN-ResNet50-vd-SSLDv2-FPN.yaml"
  413. ),
  414. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  415. "supported_dataset_types": ["COCODetDataset"],
  416. "supported_train_opts": {
  417. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  418. "dy2st": False,
  419. "amp": ["OFF"],
  420. },
  421. }
  422. )
  423. register_model_info(
  424. {
  425. "model_name": "FasterRCNN-ResNet101",
  426. "suite": "Det",
  427. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet101.yaml"),
  428. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  429. "supported_dataset_types": ["COCODetDataset"],
  430. "supported_train_opts": {
  431. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  432. "dy2st": False,
  433. "amp": ["OFF"],
  434. },
  435. }
  436. )
  437. register_model_info(
  438. {
  439. "model_name": "FasterRCNN-ResNet101-FPN",
  440. "suite": "Det",
  441. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNet101-FPN.yaml"),
  442. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  443. "supported_dataset_types": ["COCODetDataset"],
  444. "supported_train_opts": {
  445. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  446. "dy2st": False,
  447. "amp": ["OFF"],
  448. },
  449. }
  450. )
  451. register_model_info(
  452. {
  453. "model_name": "FasterRCNN-ResNeXt101-vd-FPN",
  454. "suite": "Det",
  455. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-ResNeXt101-vd-FPN.yaml"),
  456. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  457. "supported_dataset_types": ["COCODetDataset"],
  458. "supported_train_opts": {
  459. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  460. "dy2st": False,
  461. "amp": ["OFF"],
  462. },
  463. }
  464. )
  465. register_model_info(
  466. {
  467. "model_name": "FasterRCNN-Swin-Tiny-FPN",
  468. "suite": "Det",
  469. "config_path": osp.join(PDX_CONFIG_DIR, "FasterRCNN-Swin-Tiny-FPN.yaml"),
  470. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  471. "supported_dataset_types": ["COCODetDataset"],
  472. "supported_train_opts": {
  473. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  474. "dy2st": False,
  475. "amp": ["OFF"],
  476. },
  477. }
  478. )
  479. register_model_info(
  480. {
  481. "model_name": "Cascade-FasterRCNN-ResNet50-FPN",
  482. "suite": "Det",
  483. "config_path": osp.join(PDX_CONFIG_DIR, "Cascade-FasterRCNN-ResNet50-FPN.yaml"),
  484. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  485. "supported_dataset_types": ["COCODetDataset"],
  486. "supported_train_opts": {
  487. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  488. "dy2st": False,
  489. "amp": ["OFF"],
  490. },
  491. }
  492. )
  493. register_model_info(
  494. {
  495. "model_name": "Cascade-FasterRCNN-ResNet50-vd-SSLDv2-FPN",
  496. "suite": "Det",
  497. "config_path": osp.join(
  498. PDX_CONFIG_DIR, "Cascade-FasterRCNN-ResNet50-vd-SSLDv2-FPN.yaml"
  499. ),
  500. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  501. "supported_dataset_types": ["COCODetDataset"],
  502. "supported_train_opts": {
  503. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  504. "dy2st": False,
  505. "amp": ["OFF"],
  506. },
  507. }
  508. )
  509. register_model_info(
  510. {
  511. "model_name": "PicoDet-XS",
  512. "suite": "Det",
  513. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-XS.yaml"),
  514. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  515. "supported_dataset_types": ["COCODetDataset"],
  516. "supported_train_opts": {
  517. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  518. "dy2st": False,
  519. "amp": ["OFF"],
  520. },
  521. }
  522. )
  523. register_model_info(
  524. {
  525. "model_name": "PicoDet-M",
  526. "suite": "Det",
  527. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-M.yaml"),
  528. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  529. "supported_dataset_types": ["COCODetDataset"],
  530. "supported_train_opts": {
  531. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  532. "dy2st": False,
  533. "amp": ["OFF"],
  534. },
  535. }
  536. )
  537. register_model_info(
  538. {
  539. "model_name": "FCOS-ResNet50",
  540. "suite": "Det",
  541. "config_path": osp.join(PDX_CONFIG_DIR, "FCOS-ResNet50.yaml"),
  542. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  543. "supported_dataset_types": ["COCODetDataset"],
  544. "supported_train_opts": {
  545. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  546. "dy2st": False,
  547. "amp": ["OFF"],
  548. },
  549. }
  550. )
  551. register_model_info(
  552. {
  553. "model_name": "DETR-R50",
  554. "suite": "Det",
  555. "config_path": osp.join(PDX_CONFIG_DIR, "DETR-R50.yaml"),
  556. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  557. "supported_dataset_types": ["COCODetDataset"],
  558. "supported_train_opts": {
  559. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  560. "dy2st": False,
  561. "amp": ["OFF"],
  562. },
  563. }
  564. )
  565. register_model_info(
  566. {
  567. "model_name": "PP-YOLOE-L_vehicle",
  568. "suite": "Det",
  569. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE-L_vehicle.yaml"),
  570. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  571. "supported_dataset_types": ["COCODetDataset"],
  572. "supported_train_opts": {
  573. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  574. "dy2st": False,
  575. "amp": ["OFF"],
  576. },
  577. }
  578. )
  579. register_model_info(
  580. {
  581. "model_name": "PP-YOLOE-S_vehicle",
  582. "suite": "Det",
  583. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE-S_vehicle.yaml"),
  584. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  585. "supported_dataset_types": ["COCODetDataset"],
  586. "supported_train_opts": {
  587. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  588. "dy2st": False,
  589. "amp": ["OFF"],
  590. },
  591. }
  592. )
  593. register_model_info(
  594. {
  595. "model_name": "PP-ShiTuV2_det",
  596. "suite": "Det",
  597. "config_path": osp.join(PDX_CONFIG_DIR, "PP-ShiTuV2_det.yaml"),
  598. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  599. "supported_dataset_types": ["COCODetDataset"],
  600. "supported_train_opts": {
  601. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  602. "dy2st": False,
  603. "amp": ["OFF"],
  604. },
  605. }
  606. )
  607. register_model_info(
  608. {
  609. "model_name": "PP-YOLOE-L_human",
  610. "suite": "Det",
  611. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE-L_human.yaml"),
  612. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  613. "supported_dataset_types": ["COCODetDataset"],
  614. "supported_train_opts": {
  615. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  616. "dy2st": False,
  617. "amp": ["OFF"],
  618. },
  619. }
  620. )
  621. register_model_info(
  622. {
  623. "model_name": "PP-YOLOE-S_human",
  624. "suite": "Det",
  625. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE-S_human.yaml"),
  626. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  627. "supported_dataset_types": ["COCODetDataset"],
  628. "supported_train_opts": {
  629. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  630. "dy2st": False,
  631. "amp": ["OFF"],
  632. },
  633. }
  634. )
  635. register_model_info(
  636. {
  637. "model_name": "CenterNet-DLA-34",
  638. "suite": "Det",
  639. "config_path": osp.join(PDX_CONFIG_DIR, "CenterNet-DLA-34.yaml"),
  640. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  641. "supported_dataset_types": ["COCODetDataset"],
  642. "supported_train_opts": {
  643. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  644. "dy2st": False,
  645. "amp": ["OFF"],
  646. },
  647. }
  648. )
  649. register_model_info(
  650. {
  651. "model_name": "CenterNet-ResNet50",
  652. "suite": "Det",
  653. "config_path": osp.join(PDX_CONFIG_DIR, "CenterNet-ResNet50.yaml"),
  654. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  655. "supported_dataset_types": ["COCODetDataset"],
  656. "supported_train_opts": {
  657. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  658. "dy2st": False,
  659. "amp": ["OFF"],
  660. },
  661. }
  662. )
  663. register_model_info(
  664. {
  665. "model_name": "PP-YOLOE_plus_SOD-L",
  666. "suite": "Det",
  667. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus_SOD-L.yaml"),
  668. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  669. "supported_dataset_types": ["COCODetDataset"],
  670. "supported_train_opts": {
  671. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  672. "dy2st": False,
  673. "amp": ["OFF"],
  674. },
  675. }
  676. )
  677. register_model_info(
  678. {
  679. "model_name": "PP-YOLOE_plus_SOD-S",
  680. "suite": "Det",
  681. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus_SOD-S.yaml"),
  682. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  683. "supported_dataset_types": ["COCODetDataset"],
  684. "supported_train_opts": {
  685. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  686. "dy2st": False,
  687. "amp": ["OFF"],
  688. },
  689. }
  690. )
  691. register_model_info(
  692. {
  693. "model_name": "PP-YOLOE_plus_SOD-largesize-L",
  694. "suite": "Det",
  695. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus_SOD-largesize-L.yaml"),
  696. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  697. "supported_dataset_types": ["COCODetDataset"],
  698. "supported_train_opts": {
  699. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  700. "dy2st": False,
  701. "amp": ["OFF"],
  702. },
  703. }
  704. )
  705. register_model_info(
  706. {
  707. "model_name": "RT-DETR-H_layout_3cls",
  708. "suite": "Det",
  709. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-H_layout_3cls.yaml"),
  710. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  711. "supported_dataset_types": ["COCODetDataset"],
  712. "supported_train_opts": {
  713. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  714. "dy2st": False,
  715. "amp": ["OFF"],
  716. },
  717. }
  718. )
  719. register_model_info(
  720. {
  721. "model_name": "PicoDet-S_layout_3cls",
  722. "suite": "Det",
  723. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-S_layout_3cls.yaml"),
  724. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  725. "supported_dataset_types": ["COCODetDataset"],
  726. "supported_train_opts": {
  727. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  728. "dy2st": False,
  729. "amp": ["OFF"],
  730. },
  731. }
  732. )
  733. register_model_info(
  734. {
  735. "model_name": "PicoDet-S_layout_17cls",
  736. "suite": "Det",
  737. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-S_layout_17cls.yaml"),
  738. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  739. "supported_dataset_types": ["COCODetDataset"],
  740. "supported_train_opts": {
  741. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  742. "dy2st": False,
  743. "amp": ["OFF"],
  744. },
  745. }
  746. )
  747. register_model_info(
  748. {
  749. "model_name": "PicoDet-L_layout_3cls",
  750. "suite": "Det",
  751. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-L_layout_3cls.yaml"),
  752. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  753. "supported_dataset_types": ["COCODetDataset"],
  754. "supported_train_opts": {
  755. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  756. "dy2st": False,
  757. "amp": ["OFF"],
  758. },
  759. }
  760. )
  761. register_model_info(
  762. {
  763. "model_name": "PicoDet-L_layout_17cls",
  764. "suite": "Det",
  765. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-L_layout_17cls.yaml"),
  766. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  767. "supported_dataset_types": ["COCODetDataset"],
  768. "supported_train_opts": {
  769. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  770. "dy2st": False,
  771. "amp": ["OFF"],
  772. },
  773. }
  774. )
  775. register_model_info(
  776. {
  777. "model_name": "RT-DETR-H_layout_17cls",
  778. "suite": "Det",
  779. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-H_layout_17cls.yaml"),
  780. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  781. "supported_dataset_types": ["COCODetDataset"],
  782. "supported_train_opts": {
  783. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  784. "dy2st": False,
  785. "amp": ["OFF"],
  786. },
  787. }
  788. )
  789. register_model_info(
  790. {
  791. "model_name": "PicoDet_LCNet_x2_5_face",
  792. "suite": "Det",
  793. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet_LCNet_x2_5_face.yaml"),
  794. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  795. "supported_dataset_types": ["COCODetDataset"],
  796. "supported_train_opts": {
  797. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  798. "dy2st": False,
  799. "amp": ["OFF"],
  800. },
  801. }
  802. )
  803. register_model_info(
  804. {
  805. "model_name": "BlazeFace",
  806. "suite": "Det",
  807. "config_path": osp.join(PDX_CONFIG_DIR, "BlazeFace.yaml"),
  808. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  809. "supported_dataset_types": ["COCODetDataset"],
  810. "supported_train_opts": {
  811. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  812. "dy2st": False,
  813. "amp": ["OFF"],
  814. },
  815. }
  816. )
  817. register_model_info(
  818. {
  819. "model_name": "BlazeFace-FPN-SSH",
  820. "suite": "Det",
  821. "config_path": osp.join(PDX_CONFIG_DIR, "BlazeFace-FPN-SSH.yaml"),
  822. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  823. "supported_dataset_types": ["COCODetDataset"],
  824. "supported_train_opts": {
  825. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  826. "dy2st": False,
  827. "amp": ["OFF"],
  828. },
  829. }
  830. )
  831. register_model_info(
  832. {
  833. "model_name": "PP-YOLOE_plus-S_face",
  834. "suite": "Det",
  835. "config_path": osp.join(PDX_CONFIG_DIR, "PP-YOLOE_plus-S_face.yaml"),
  836. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  837. "supported_dataset_types": ["COCODetDataset"],
  838. "supported_train_opts": {
  839. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  840. "dy2st": False,
  841. "amp": ["OFF"],
  842. },
  843. }
  844. )