register.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780
  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 ClsModel
  19. from .runner import ClsRunner
  20. from .config import ClsConfig
  21. REPO_ROOT_PATH = os.environ.get("PADDLE_PDX_PADDLECLAS_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": "Cls",
  27. "model": ClsModel,
  28. "runner": ClsRunner,
  29. "config": ClsConfig,
  30. "runner_root_path": REPO_ROOT_PATH,
  31. }
  32. )
  33. ################ Models Using Universal Config ################
  34. register_model_info(
  35. {
  36. "model_name": "SwinTransformer_tiny_patch4_window7_224",
  37. "suite": "Cls",
  38. "config_path": osp.join(
  39. PDX_CONFIG_DIR, "SwinTransformer_tiny_patch4_window7_224.yaml"
  40. ),
  41. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  42. "infer_config": "deploy/configs/inference_cls.yaml",
  43. "hpi_config_path": HPI_CONFIG_DIR
  44. / "SwinTransformer_tiny_patch4_window7_224.yaml",
  45. }
  46. )
  47. register_model_info(
  48. {
  49. "model_name": "SwinTransformer_small_patch4_window7_224",
  50. "suite": "Cls",
  51. "config_path": osp.join(
  52. PDX_CONFIG_DIR, "SwinTransformer_small_patch4_window7_224.yaml"
  53. ),
  54. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  55. "infer_config": "deploy/configs/inference_cls.yaml",
  56. "hpi_config_path": HPI_CONFIG_DIR
  57. / "SwinTransformer_small_patch4_window7_224.yaml",
  58. }
  59. )
  60. register_model_info(
  61. {
  62. "model_name": "SwinTransformer_base_patch4_window7_224",
  63. "suite": "Cls",
  64. "config_path": osp.join(
  65. PDX_CONFIG_DIR, "SwinTransformer_base_patch4_window7_224.yaml"
  66. ),
  67. "supported_apis": ["train", "evaluate", "predict", "export"],
  68. "hpi_config_path": HPI_CONFIG_DIR
  69. / "SwinTransformer_base_patch4_window7_224.yaml",
  70. }
  71. )
  72. register_model_info(
  73. {
  74. "model_name": "SwinTransformer_base_patch4_window12_384",
  75. "suite": "Cls",
  76. "config_path": osp.join(
  77. PDX_CONFIG_DIR, "SwinTransformer_base_patch4_window12_384.yaml"
  78. ),
  79. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  80. "infer_config": "deploy/configs/inference_cls.yaml",
  81. "hpi_config_path": HPI_CONFIG_DIR
  82. / "SwinTransformer_base_patch4_window12_384.yaml",
  83. }
  84. )
  85. register_model_info(
  86. {
  87. "model_name": "SwinTransformer_large_patch4_window7_224",
  88. "suite": "Cls",
  89. "config_path": osp.join(
  90. PDX_CONFIG_DIR, "SwinTransformer_large_patch4_window7_224.yaml"
  91. ),
  92. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  93. "infer_config": "deploy/configs/inference_cls.yaml",
  94. "hpi_config_path": HPI_CONFIG_DIR
  95. / "SwinTransformer_large_patch4_window7_224.yaml",
  96. }
  97. )
  98. register_model_info(
  99. {
  100. "model_name": "SwinTransformer_large_patch4_window12_384",
  101. "suite": "Cls",
  102. "config_path": osp.join(
  103. PDX_CONFIG_DIR, "SwinTransformer_large_patch4_window12_384.yaml"
  104. ),
  105. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  106. "infer_config": "deploy/configs/inference_cls.yaml",
  107. "hpi_config_path": HPI_CONFIG_DIR
  108. / "SwinTransformer_large_patch4_window12_384.yaml",
  109. }
  110. )
  111. register_model_info(
  112. {
  113. "model_name": "PP-LCNet_x0_25",
  114. "suite": "Cls",
  115. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x0_25.yaml"),
  116. "supported_apis": ["train", "evaluate", "predict", "export"],
  117. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x0_25.yaml",
  118. }
  119. )
  120. register_model_info(
  121. {
  122. "model_name": "PP-LCNet_x0_35",
  123. "suite": "Cls",
  124. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x0_35.yaml"),
  125. "supported_apis": ["train", "evaluate", "predict", "export"],
  126. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x0_35.yaml",
  127. }
  128. )
  129. register_model_info(
  130. {
  131. "model_name": "PP-LCNet_x0_5",
  132. "suite": "Cls",
  133. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x0_5.yaml"),
  134. "supported_apis": ["train", "evaluate", "predict", "export"],
  135. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x0_5.yaml",
  136. }
  137. )
  138. register_model_info(
  139. {
  140. "model_name": "PP-LCNet_x0_75",
  141. "suite": "Cls",
  142. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x0_75.yaml"),
  143. "supported_apis": ["train", "evaluate", "predict", "export"],
  144. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x0_75.yaml",
  145. }
  146. )
  147. register_model_info(
  148. {
  149. "model_name": "PP-LCNet_x1_0",
  150. "suite": "Cls",
  151. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_0.yaml"),
  152. "supported_apis": ["train", "evaluate", "predict", "export"],
  153. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x1_0.yaml",
  154. }
  155. )
  156. register_model_info(
  157. {
  158. "model_name": "PP-LCNet_x1_5",
  159. "suite": "Cls",
  160. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_5.yaml"),
  161. "supported_apis": ["train", "evaluate", "predict", "export"],
  162. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x1_5.yaml",
  163. }
  164. )
  165. register_model_info(
  166. {
  167. "model_name": "PP-LCNet_x2_0",
  168. "suite": "Cls",
  169. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x2_0.yaml"),
  170. "supported_apis": ["train", "evaluate", "predict", "export"],
  171. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x2_0.yaml",
  172. }
  173. )
  174. register_model_info(
  175. {
  176. "model_name": "PP-LCNet_x2_5",
  177. "suite": "Cls",
  178. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x2_5.yaml"),
  179. "supported_apis": ["train", "evaluate", "predict", "export"],
  180. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x2_5.yaml",
  181. }
  182. )
  183. register_model_info(
  184. {
  185. "model_name": "PP-LCNetV2_small",
  186. "suite": "Cls",
  187. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_small.yaml"),
  188. "supported_apis": ["train", "evaluate", "predict", "export"],
  189. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_small.yaml",
  190. }
  191. )
  192. register_model_info(
  193. {
  194. "model_name": "PP-LCNetV2_base",
  195. "suite": "Cls",
  196. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_base.yaml"),
  197. "supported_apis": ["train", "evaluate", "predict", "export"],
  198. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_base.yaml",
  199. }
  200. )
  201. register_model_info(
  202. {
  203. "model_name": "PP-LCNetV2_large",
  204. "suite": "Cls",
  205. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_large.yaml"),
  206. "supported_apis": ["train", "evaluate", "predict", "export"],
  207. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_large.yaml",
  208. }
  209. )
  210. register_model_info(
  211. {
  212. "model_name": "CLIP_vit_base_patch16_224",
  213. "suite": "Cls",
  214. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_base_patch16_224.yaml"),
  215. "supported_apis": ["train", "evaluate", "predict", "export"],
  216. "hpi_config_path": HPI_CONFIG_DIR / "CLIP_vit_base_patch16_224.yaml",
  217. }
  218. )
  219. register_model_info(
  220. {
  221. "model_name": "CLIP_vit_large_patch14_224",
  222. "suite": "Cls",
  223. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_large_patch14_224.yaml"),
  224. "supported_apis": ["train", "evaluate", "predict", "export"],
  225. "hpi_config_path": HPI_CONFIG_DIR / "CLIP_vit_large_patch14_224.yaml",
  226. }
  227. )
  228. register_model_info(
  229. {
  230. "model_name": "PP-HGNet_tiny",
  231. "suite": "Cls",
  232. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_tiny.yaml"),
  233. "supported_apis": ["train", "evaluate", "predict", "export"],
  234. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_tiny.yaml",
  235. }
  236. )
  237. register_model_info(
  238. {
  239. "model_name": "PP-HGNet_small",
  240. "suite": "Cls",
  241. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_small.yaml"),
  242. "supported_apis": ["train", "evaluate", "predict", "export"],
  243. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_small.yaml",
  244. }
  245. )
  246. register_model_info(
  247. {
  248. "model_name": "PP-HGNet_base",
  249. "suite": "Cls",
  250. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_base.yaml"),
  251. "supported_apis": ["train", "evaluate", "predict", "export"],
  252. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_base.yaml",
  253. }
  254. )
  255. register_model_info(
  256. {
  257. "model_name": "PP-HGNetV2-B0",
  258. "suite": "Cls",
  259. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B0.yaml"),
  260. "supported_apis": ["train", "evaluate", "predict", "export"],
  261. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B0.yaml",
  262. }
  263. )
  264. register_model_info(
  265. {
  266. "model_name": "PP-HGNetV2-B1",
  267. "suite": "Cls",
  268. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B1.yaml"),
  269. "supported_apis": ["train", "evaluate", "predict", "export"],
  270. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B1.yaml",
  271. }
  272. )
  273. register_model_info(
  274. {
  275. "model_name": "PP-HGNetV2-B2",
  276. "suite": "Cls",
  277. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B2.yaml"),
  278. "supported_apis": ["train", "evaluate", "predict", "export"],
  279. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B2.yaml",
  280. }
  281. )
  282. register_model_info(
  283. {
  284. "model_name": "PP-HGNetV2-B3",
  285. "suite": "Cls",
  286. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B3.yaml"),
  287. "supported_apis": ["train", "evaluate", "predict", "export"],
  288. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B3.yaml",
  289. }
  290. )
  291. register_model_info(
  292. {
  293. "model_name": "PP-HGNetV2-B4",
  294. "suite": "Cls",
  295. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B4.yaml"),
  296. "supported_apis": ["train", "evaluate", "predict", "export"],
  297. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B4.yaml",
  298. }
  299. )
  300. register_model_info(
  301. {
  302. "model_name": "PP-HGNetV2-B5",
  303. "suite": "Cls",
  304. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B5.yaml"),
  305. "supported_apis": ["train", "evaluate", "predict", "export"],
  306. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B5.yaml",
  307. }
  308. )
  309. register_model_info(
  310. {
  311. "model_name": "PP-HGNetV2-B6",
  312. "suite": "Cls",
  313. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B6.yaml"),
  314. "supported_apis": ["train", "evaluate", "predict", "export"],
  315. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B6.yaml",
  316. }
  317. )
  318. register_model_info(
  319. {
  320. "model_name": "ResNet18",
  321. "suite": "Cls",
  322. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet18.yaml"),
  323. "supported_apis": ["train", "evaluate", "predict", "export"],
  324. "hpi_config_path": HPI_CONFIG_DIR / "ResNet18.yaml",
  325. }
  326. )
  327. register_model_info(
  328. {
  329. "model_name": "ResNet18_vd",
  330. "suite": "Cls",
  331. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet18_vd.yaml"),
  332. "supported_apis": ["train", "evaluate", "predict", "export"],
  333. "hpi_config_path": HPI_CONFIG_DIR / "ResNet18_vd.yaml",
  334. }
  335. )
  336. register_model_info(
  337. {
  338. "model_name": "ResNet34",
  339. "suite": "Cls",
  340. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet34.yaml"),
  341. "supported_apis": ["train", "evaluate", "predict", "export"],
  342. "hpi_config_path": HPI_CONFIG_DIR / "ResNet34.yaml",
  343. }
  344. )
  345. register_model_info(
  346. {
  347. "model_name": "ResNet34_vd",
  348. "suite": "Cls",
  349. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet34_vd.yaml"),
  350. "supported_apis": ["train", "evaluate", "predict", "export"],
  351. "hpi_config_path": HPI_CONFIG_DIR / "ResNet34_vd.yaml",
  352. }
  353. )
  354. register_model_info(
  355. {
  356. "model_name": "ResNet50",
  357. "suite": "Cls",
  358. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50.yaml"),
  359. "supported_apis": ["train", "evaluate", "predict", "export"],
  360. "hpi_config_path": HPI_CONFIG_DIR / "ResNet50.yaml",
  361. }
  362. )
  363. register_model_info(
  364. {
  365. "model_name": "ResNet50_vd",
  366. "suite": "Cls",
  367. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50_vd.yaml"),
  368. "supported_apis": ["train", "evaluate", "predict", "export"],
  369. "hpi_config_path": HPI_CONFIG_DIR / "ResNet50_vd.yaml",
  370. }
  371. )
  372. register_model_info(
  373. {
  374. "model_name": "ResNet101",
  375. "suite": "Cls",
  376. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet101.yaml"),
  377. "supported_apis": ["train", "evaluate", "predict", "export"],
  378. "hpi_config_path": HPI_CONFIG_DIR / "ResNet101.yaml",
  379. }
  380. )
  381. register_model_info(
  382. {
  383. "model_name": "ResNet101_vd",
  384. "suite": "Cls",
  385. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet101_vd.yaml"),
  386. "supported_apis": ["train", "evaluate", "predict", "export"],
  387. "hpi_config_path": HPI_CONFIG_DIR / "ResNet101_vd.yaml",
  388. }
  389. )
  390. register_model_info(
  391. {
  392. "model_name": "ResNet152",
  393. "suite": "Cls",
  394. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet152.yaml"),
  395. "supported_apis": ["train", "evaluate", "predict", "export"],
  396. "hpi_config_path": HPI_CONFIG_DIR / "ResNet152.yaml",
  397. }
  398. )
  399. register_model_info(
  400. {
  401. "model_name": "ResNet152_vd",
  402. "suite": "Cls",
  403. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet152_vd.yaml"),
  404. "supported_apis": ["train", "evaluate", "predict", "export"],
  405. "hpi_config_path": HPI_CONFIG_DIR / "ResNet152_vd.yaml",
  406. }
  407. )
  408. register_model_info(
  409. {
  410. "model_name": "ResNet200_vd",
  411. "suite": "Cls",
  412. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet200_vd.yaml"),
  413. "supported_apis": ["train", "evaluate", "predict", "export"],
  414. "hpi_config_path": HPI_CONFIG_DIR / "ResNet200_vd.yaml",
  415. }
  416. )
  417. register_model_info(
  418. {
  419. "model_name": "MobileNetV1_x0_25",
  420. "suite": "Cls",
  421. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_25.yaml"),
  422. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  423. "infer_config": "deploy/configs/inference_cls.yaml",
  424. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x0_25.yaml",
  425. }
  426. )
  427. register_model_info(
  428. {
  429. "model_name": "MobileNetV1_x0_5",
  430. "suite": "Cls",
  431. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_5.yaml"),
  432. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  433. "infer_config": "deploy/configs/inference_cls.yaml",
  434. "hpi_config_path": HPI_CONFIG_DIR / ".yaml",
  435. }
  436. )
  437. register_model_info(
  438. {
  439. "model_name": "MobileNetV1_x0_75",
  440. "suite": "Cls",
  441. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_75.yaml"),
  442. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  443. "infer_config": "deploy/configs/inference_cls.yaml",
  444. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x0_5.yaml",
  445. }
  446. )
  447. register_model_info(
  448. {
  449. "model_name": "MobileNetV1_x1_0",
  450. "suite": "Cls",
  451. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x1_0.yaml"),
  452. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  453. "infer_config": "deploy/configs/inference_cls.yaml",
  454. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x1_0.yaml",
  455. }
  456. )
  457. register_model_info(
  458. {
  459. "model_name": "MobileNetV2_x0_25",
  460. "suite": "Cls",
  461. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x0_25.yaml"),
  462. "supported_apis": ["train", "evaluate", "predict", "export"],
  463. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x0_25.yaml",
  464. }
  465. )
  466. register_model_info(
  467. {
  468. "model_name": "MobileNetV2_x0_5",
  469. "suite": "Cls",
  470. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x0_5.yaml"),
  471. "supported_apis": ["train", "evaluate", "predict", "export"],
  472. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x0_5.yaml",
  473. }
  474. )
  475. register_model_info(
  476. {
  477. "model_name": "MobileNetV2_x1_0",
  478. "suite": "Cls",
  479. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x1_0.yaml"),
  480. "supported_apis": ["train", "evaluate", "predict", "export"],
  481. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x1_0.yaml",
  482. }
  483. )
  484. register_model_info(
  485. {
  486. "model_name": "MobileNetV2_x1_5",
  487. "suite": "Cls",
  488. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x1_5.yaml"),
  489. "supported_apis": ["train", "evaluate", "predict", "export"],
  490. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x1_5.yaml",
  491. }
  492. )
  493. register_model_info(
  494. {
  495. "model_name": "MobileNetV2_x2_0",
  496. "suite": "Cls",
  497. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x2_0.yaml"),
  498. "supported_apis": ["train", "evaluate", "predict", "export"],
  499. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x2_0.yaml",
  500. }
  501. )
  502. register_model_info(
  503. {
  504. "model_name": "MobileNetV3_large_x0_35",
  505. "suite": "Cls",
  506. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_35.yaml"),
  507. "supported_apis": ["train", "evaluate", "predict", "export"],
  508. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_35.yaml",
  509. }
  510. )
  511. register_model_info(
  512. {
  513. "model_name": "MobileNetV3_large_x0_5",
  514. "suite": "Cls",
  515. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_5.yaml"),
  516. "supported_apis": ["train", "evaluate", "predict", "export"],
  517. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_5.yaml",
  518. }
  519. )
  520. register_model_info(
  521. {
  522. "model_name": "MobileNetV3_large_x0_75",
  523. "suite": "Cls",
  524. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_75.yaml"),
  525. "supported_apis": ["train", "evaluate", "predict", "export"],
  526. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_75.yaml",
  527. }
  528. )
  529. register_model_info(
  530. {
  531. "model_name": "MobileNetV3_large_x1_0",
  532. "suite": "Cls",
  533. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x1_0.yaml"),
  534. "supported_apis": ["train", "evaluate", "predict", "export"],
  535. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x1_0.yaml",
  536. }
  537. )
  538. register_model_info(
  539. {
  540. "model_name": "MobileNetV3_large_x1_25",
  541. "suite": "Cls",
  542. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x1_25.yaml"),
  543. "supported_apis": ["train", "evaluate", "predict", "export"],
  544. "hpi_config_path": HPI_CONFIG_DIR / ".yaml",
  545. }
  546. )
  547. register_model_info(
  548. {
  549. "model_name": "MobileNetV3_small_x0_35",
  550. "suite": "Cls",
  551. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_35.yaml"),
  552. "supported_apis": ["train", "evaluate", "predict", "export"],
  553. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x1_25.yaml",
  554. }
  555. )
  556. register_model_info(
  557. {
  558. "model_name": "MobileNetV3_small_x0_5",
  559. "suite": "Cls",
  560. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_5.yaml"),
  561. "supported_apis": ["train", "evaluate", "predict", "export"],
  562. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x0_5.yaml",
  563. }
  564. )
  565. register_model_info(
  566. {
  567. "model_name": "MobileNetV3_small_x0_75",
  568. "suite": "Cls",
  569. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_75.yaml"),
  570. "supported_apis": ["train", "evaluate", "predict", "export"],
  571. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x0_75.yaml",
  572. }
  573. )
  574. register_model_info(
  575. {
  576. "model_name": "MobileNetV3_small_x1_0",
  577. "suite": "Cls",
  578. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x1_0.yaml"),
  579. "supported_apis": ["train", "evaluate", "predict", "export"],
  580. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x1_0.yaml",
  581. }
  582. )
  583. register_model_info(
  584. {
  585. "model_name": "MobileNetV3_small_x1_25",
  586. "suite": "Cls",
  587. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x1_25.yaml"),
  588. "supported_apis": ["train", "evaluate", "predict", "export"],
  589. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x1_25.yaml",
  590. }
  591. )
  592. register_model_info(
  593. {
  594. "model_name": "ConvNeXt_tiny",
  595. "suite": "Cls",
  596. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_tiny.yaml"),
  597. "supported_apis": ["train", "evaluate", "predict", "export"],
  598. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_tiny.yaml",
  599. }
  600. )
  601. register_model_info(
  602. {
  603. "model_name": "ConvNeXt_small",
  604. "suite": "Cls",
  605. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_small.yaml"),
  606. "supported_apis": ["train", "evaluate", "predict", "export"],
  607. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_small.yaml",
  608. }
  609. )
  610. register_model_info(
  611. {
  612. "model_name": "ConvNeXt_base_224",
  613. "suite": "Cls",
  614. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_base_224.yaml"),
  615. "supported_apis": ["train", "evaluate", "predict", "export"],
  616. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_base_224.yaml",
  617. }
  618. )
  619. register_model_info(
  620. {
  621. "model_name": "ConvNeXt_base_384",
  622. "suite": "Cls",
  623. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_base_384.yaml"),
  624. "supported_apis": ["train", "evaluate", "predict", "export"],
  625. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_base_384.yaml",
  626. }
  627. )
  628. register_model_info(
  629. {
  630. "model_name": "ConvNeXt_large_224",
  631. "suite": "Cls",
  632. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_large_224.yaml"),
  633. "supported_apis": ["train", "evaluate", "predict", "export"],
  634. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_large_224.yaml",
  635. }
  636. )
  637. register_model_info(
  638. {
  639. "model_name": "ConvNeXt_large_384",
  640. "suite": "Cls",
  641. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_large_384.yaml"),
  642. "supported_apis": ["train", "evaluate", "predict", "export"],
  643. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_large_384.yaml",
  644. }
  645. )
  646. register_model_info(
  647. {
  648. "model_name": "PP-LCNet_x1_0_ML",
  649. "suite": "Cls",
  650. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_0_ML.yaml"),
  651. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  652. "infer_config": "deploy/configs/inference_cls.yaml",
  653. "hpi_config_path": None,
  654. }
  655. )
  656. register_model_info(
  657. {
  658. "model_name": "ResNet50_ML",
  659. "suite": "Cls",
  660. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50_ML.yaml"),
  661. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  662. "infer_config": "deploy/configs/inference_cls.yaml",
  663. "hpi_config_path": None,
  664. }
  665. )
  666. register_model_info(
  667. {
  668. "model_name": "PP-HGNetV2-B0_ML",
  669. "suite": "Cls",
  670. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B0_ML.yaml"),
  671. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  672. "infer_config": "deploy/configs/inference_cls.yaml",
  673. "hpi_config_path": None,
  674. }
  675. )
  676. register_model_info(
  677. {
  678. "model_name": "PP-HGNetV2-B4_ML",
  679. "suite": "Cls",
  680. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B4_ML.yaml"),
  681. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  682. "infer_config": "deploy/configs/inference_cls.yaml",
  683. "hpi_config_path": None,
  684. }
  685. )
  686. register_model_info(
  687. {
  688. "model_name": "PP-HGNetV2-B6_ML",
  689. "suite": "Cls",
  690. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B6_ML.yaml"),
  691. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  692. "infer_config": "deploy/configs/inference_cls.yaml",
  693. "hpi_config_path": None,
  694. }
  695. )
  696. register_model_info(
  697. {
  698. "model_name": "CLIP_vit_base_patch16_448_ML",
  699. "suite": "Cls",
  700. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_base_patch16_448_ML.yaml"),
  701. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  702. "infer_config": "deploy/configs/inference_cls.yaml",
  703. "hpi_config_path": None,
  704. }
  705. )