register.py 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  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(PDX_CONFIG_DIR, 'FasterRCNN-ResNet50-vd-SSLDv2-FPN.yaml'),
  412. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  413. 'supported_dataset_types': ['COCODetDataset'],
  414. 'supported_train_opts': {
  415. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  416. 'dy2st': False,
  417. 'amp': ['OFF']
  418. },
  419. }
  420. )
  421. register_model_info(
  422. {
  423. 'model_name': 'FasterRCNN-ResNet101',
  424. 'suite': 'Det',
  425. 'config_path': osp.join(PDX_CONFIG_DIR, 'FasterRCNN-ResNet101.yaml'),
  426. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  427. 'supported_dataset_types': ['COCODetDataset'],
  428. 'supported_train_opts': {
  429. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  430. 'dy2st': False,
  431. 'amp': ['OFF']
  432. },
  433. }
  434. )
  435. register_model_info(
  436. {
  437. 'model_name': 'FasterRCNN-ResNet101-FPN',
  438. 'suite': 'Det',
  439. 'config_path': osp.join(PDX_CONFIG_DIR, 'FasterRCNN-ResNet101-FPN.yaml'),
  440. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  441. 'supported_dataset_types': ['COCODetDataset'],
  442. 'supported_train_opts': {
  443. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  444. 'dy2st': False,
  445. 'amp': ['OFF']
  446. },
  447. }
  448. )
  449. register_model_info(
  450. {
  451. 'model_name': 'FasterRCNN-ResNeXt101-vd-FPN',
  452. 'suite': 'Det',
  453. 'config_path': osp.join(PDX_CONFIG_DIR, 'FasterRCNN-ResNeXt101-vd-FPN.yaml'),
  454. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  455. 'supported_dataset_types': ['COCODetDataset'],
  456. 'supported_train_opts': {
  457. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  458. 'dy2st': False,
  459. 'amp': ['OFF']
  460. },
  461. }
  462. )
  463. register_model_info(
  464. {
  465. 'model_name': 'FasterRCNN-Swin-Tiny-FPN',
  466. 'suite': 'Det',
  467. 'config_path': osp.join(PDX_CONFIG_DIR, 'FasterRCNN-Swin-Tiny-FPN.yaml'),
  468. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  469. 'supported_dataset_types': ['COCODetDataset'],
  470. 'supported_train_opts': {
  471. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  472. 'dy2st': False,
  473. 'amp': ['OFF']
  474. },
  475. }
  476. )
  477. register_model_info(
  478. {
  479. 'model_name': 'Cascade-FasterRCNN-ResNet50-FPN',
  480. 'suite': 'Det',
  481. 'config_path': osp.join(PDX_CONFIG_DIR, 'Cascade-FasterRCNN-ResNet50-FPN.yaml'),
  482. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  483. 'supported_dataset_types': ['COCODetDataset'],
  484. 'supported_train_opts': {
  485. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  486. 'dy2st': False,
  487. 'amp': ['OFF']
  488. },
  489. }
  490. )
  491. register_model_info(
  492. {
  493. 'model_name': 'Cascade-FasterRCNN-ResNet50-vd-SSLDv2-FPN',
  494. 'suite': 'Det',
  495. 'config_path': osp.join(PDX_CONFIG_DIR, 'Cascade-FasterRCNN-ResNet50-vd-SSLDv2-FPN.yaml'),
  496. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  497. 'supported_dataset_types': ['COCODetDataset'],
  498. 'supported_train_opts': {
  499. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  500. 'dy2st': False,
  501. 'amp': ['OFF']
  502. },
  503. }
  504. )
  505. register_model_info(
  506. {
  507. 'model_name': 'PicoDet-XS',
  508. 'suite': 'Det',
  509. 'config_path': osp.join(PDX_CONFIG_DIR, 'PicoDet-XS.yaml'),
  510. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  511. 'supported_dataset_types': ['COCODetDataset'],
  512. 'supported_train_opts': {
  513. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  514. 'dy2st': False,
  515. 'amp': ['OFF']
  516. },
  517. }
  518. )
  519. register_model_info(
  520. {
  521. 'model_name': 'PicoDet-M',
  522. 'suite': 'Det',
  523. 'config_path': osp.join(PDX_CONFIG_DIR, 'PicoDet-M.yaml'),
  524. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  525. 'supported_dataset_types': ['COCODetDataset'],
  526. 'supported_train_opts': {
  527. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  528. 'dy2st': False,
  529. 'amp': ['OFF']
  530. },
  531. }
  532. )
  533. register_model_info(
  534. {
  535. 'model_name': 'FCOS-ResNet50',
  536. 'suite': 'Det',
  537. 'config_path': osp.join(PDX_CONFIG_DIR, 'FCOS-ResNet50.yaml'),
  538. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  539. 'supported_dataset_types': ['COCODetDataset'],
  540. 'supported_train_opts': {
  541. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  542. 'dy2st': False,
  543. 'amp': ['OFF']
  544. },
  545. }
  546. )
  547. register_model_info(
  548. {
  549. 'model_name': 'DETR-R50',
  550. 'suite': 'Det',
  551. 'config_path': osp.join(PDX_CONFIG_DIR, 'DETR-R50.yaml'),
  552. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  553. 'supported_dataset_types': ['COCODetDataset'],
  554. 'supported_train_opts': {
  555. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  556. 'dy2st': False,
  557. 'amp': ['OFF']
  558. },
  559. }
  560. )
  561. register_model_info(
  562. {
  563. 'model_name': 'PP-YOLOE-L_vehicle',
  564. 'suite': 'Det',
  565. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE-L_vehicle.yaml'),
  566. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  567. 'supported_dataset_types': ['COCODetDataset'],
  568. 'supported_train_opts': {
  569. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  570. 'dy2st': False,
  571. 'amp': ['OFF']
  572. },
  573. }
  574. )
  575. register_model_info(
  576. {
  577. 'model_name': 'PP-YOLOE-S_vehicle',
  578. 'suite': 'Det',
  579. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE-S_vehicle.yaml'),
  580. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  581. 'supported_dataset_types': ['COCODetDataset'],
  582. 'supported_train_opts': {
  583. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  584. 'dy2st': False,
  585. 'amp': ['OFF']
  586. },
  587. }
  588. )
  589. register_model_info(
  590. {
  591. 'model_name': 'PP-ShiTuV2_det',
  592. 'suite': 'Det',
  593. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-ShiTuV2_det.yaml'),
  594. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  595. 'supported_dataset_types': ['COCODetDataset'],
  596. 'supported_train_opts': {
  597. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  598. 'dy2st': False,
  599. 'amp': ['OFF']
  600. },
  601. }
  602. )
  603. register_model_info(
  604. {
  605. 'model_name': 'PP-YOLOE-L_human',
  606. 'suite': 'Det',
  607. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE-L_human.yaml'),
  608. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  609. 'supported_dataset_types': ['COCODetDataset'],
  610. 'supported_train_opts': {
  611. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  612. 'dy2st': False,
  613. 'amp': ['OFF']
  614. },
  615. }
  616. )
  617. register_model_info(
  618. {
  619. 'model_name': 'PP-YOLOE-S_human',
  620. 'suite': 'Det',
  621. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE-S_human.yaml'),
  622. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  623. 'supported_dataset_types': ['COCODetDataset'],
  624. 'supported_train_opts': {
  625. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  626. 'dy2st': False,
  627. 'amp': ['OFF']
  628. },
  629. }
  630. )
  631. register_model_info(
  632. {
  633. 'model_name': 'CenterNet-DLA-34',
  634. 'suite': 'Det',
  635. 'config_path': osp.join(PDX_CONFIG_DIR, 'CenterNet-DLA-34.yaml'),
  636. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  637. 'supported_dataset_types': ['COCODetDataset'],
  638. 'supported_train_opts': {
  639. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  640. 'dy2st': False,
  641. 'amp': ['OFF']
  642. },
  643. }
  644. )
  645. register_model_info(
  646. {
  647. 'model_name': 'CenterNet-ResNet50',
  648. 'suite': 'Det',
  649. 'config_path': osp.join(PDX_CONFIG_DIR, 'CenterNet-ResNet50.yaml'),
  650. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  651. 'supported_dataset_types': ['COCODetDataset'],
  652. 'supported_train_opts': {
  653. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  654. 'dy2st': False,
  655. 'amp': ['OFF']
  656. },
  657. }
  658. )
  659. register_model_info(
  660. {
  661. 'model_name': 'PP-YOLOE+_SOD-L',
  662. 'suite': 'Det',
  663. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE+_SOD-L.yaml'),
  664. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  665. 'supported_dataset_types': ['COCODetDataset'],
  666. 'supported_train_opts': {
  667. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  668. 'dy2st': False,
  669. 'amp': ['OFF']
  670. },
  671. }
  672. )
  673. register_model_info(
  674. {
  675. 'model_name': 'PP-YOLOE+_SOD-S',
  676. 'suite': 'Det',
  677. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE+_SOD-S.yaml'),
  678. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  679. 'supported_dataset_types': ['COCODetDataset'],
  680. 'supported_train_opts': {
  681. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  682. 'dy2st': False,
  683. 'amp': ['OFF']
  684. },
  685. }
  686. )
  687. register_model_info(
  688. {
  689. 'model_name': 'PP-YOLOE+_SOD-largesize-L',
  690. 'suite': 'Det',
  691. 'config_path': osp.join(PDX_CONFIG_DIR, 'PP-YOLOE+_SOD-largesize-L.yaml'),
  692. 'supported_apis': ['train', 'evaluate', 'predict', 'export', 'infer'],
  693. 'supported_dataset_types': ['COCODetDataset'],
  694. 'supported_train_opts': {
  695. 'device': ['cpu', 'gpu_nxcx', 'xpu', 'npu', 'mlu'],
  696. 'dy2st': False,
  697. 'amp': ['OFF']
  698. },
  699. }
  700. )
  701. register_model_info(
  702. {
  703. "model_name": "RT-DETR-H_layout_3cls",
  704. "suite": "Det",
  705. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-H_layout_3cls.yaml"),
  706. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  707. "supported_dataset_types": ["COCODetDataset"],
  708. "supported_train_opts": {
  709. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  710. "dy2st": False,
  711. "amp": ["OFF"],
  712. },
  713. }
  714. )
  715. register_model_info(
  716. {
  717. "model_name": "PicoDet-L_layout",
  718. "suite": "Det",
  719. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet-L_layout.yaml"),
  720. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  721. "supported_dataset_types": ["COCODetDataset"],
  722. "supported_train_opts": {
  723. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  724. "dy2st": False,
  725. "amp": ["OFF"],
  726. },
  727. }
  728. )
  729. register_model_info(
  730. {
  731. "model_name": "RT-DETR-H_layout_17cls",
  732. "suite": "Det",
  733. "config_path": osp.join(PDX_CONFIG_DIR, "RT-DETR-H_layout_17cls.yaml"),
  734. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  735. "supported_dataset_types": ["COCODetDataset"],
  736. "supported_train_opts": {
  737. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  738. "dy2st": False,
  739. "amp": ["OFF"],
  740. },
  741. }
  742. )
  743. register_model_info(
  744. {
  745. "model_name": "PicoDet_LCNet_x2_5_face",
  746. "suite": "Det",
  747. "config_path": osp.join(PDX_CONFIG_DIR, "PicoDet_LCNet_x2_5_face.yaml"),
  748. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  749. "supported_dataset_types": ["COCODetDataset"],
  750. "supported_train_opts": {
  751. "device": ["cpu", "gpu_nxcx", "xpu", "npu", "mlu"],
  752. "dy2st": False,
  753. "amp": ["OFF"],
  754. },
  755. }
  756. )