register.py 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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_0_doc_ori",
  159. "suite": "Cls",
  160. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_0_doc_ori.yaml"),
  161. "supported_apis": ["train", "evaluate", "predict", "export"],
  162. }
  163. )
  164. register_model_info(
  165. {
  166. "model_name": "PP-LCNet_x1_5",
  167. "suite": "Cls",
  168. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_5.yaml"),
  169. "supported_apis": ["train", "evaluate", "predict", "export"],
  170. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x1_5.yaml",
  171. }
  172. )
  173. register_model_info(
  174. {
  175. "model_name": "PP-LCNet_x2_0",
  176. "suite": "Cls",
  177. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x2_0.yaml"),
  178. "supported_apis": ["train", "evaluate", "predict", "export"],
  179. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x2_0.yaml",
  180. }
  181. )
  182. register_model_info(
  183. {
  184. "model_name": "PP-LCNet_x2_5",
  185. "suite": "Cls",
  186. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x2_5.yaml"),
  187. "supported_apis": ["train", "evaluate", "predict", "export"],
  188. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNet_x2_5.yaml",
  189. }
  190. )
  191. register_model_info(
  192. {
  193. "model_name": "PP-LCNetV2_small",
  194. "suite": "Cls",
  195. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_small.yaml"),
  196. "supported_apis": ["train", "evaluate", "predict", "export"],
  197. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_small.yaml",
  198. }
  199. )
  200. register_model_info(
  201. {
  202. "model_name": "PP-LCNetV2_base",
  203. "suite": "Cls",
  204. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_base.yaml"),
  205. "supported_apis": ["train", "evaluate", "predict", "export"],
  206. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_base.yaml",
  207. }
  208. )
  209. register_model_info(
  210. {
  211. "model_name": "PP-LCNetV2_large",
  212. "suite": "Cls",
  213. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNetV2_large.yaml"),
  214. "supported_apis": ["train", "evaluate", "predict", "export"],
  215. "hpi_config_path": HPI_CONFIG_DIR / "PP-LCNetV2_large.yaml",
  216. }
  217. )
  218. register_model_info(
  219. {
  220. "model_name": "CLIP_vit_base_patch16_224",
  221. "suite": "Cls",
  222. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_base_patch16_224.yaml"),
  223. "supported_apis": ["train", "evaluate", "predict", "export"],
  224. "hpi_config_path": HPI_CONFIG_DIR / "CLIP_vit_base_patch16_224.yaml",
  225. }
  226. )
  227. register_model_info(
  228. {
  229. "model_name": "CLIP_vit_large_patch14_224",
  230. "suite": "Cls",
  231. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_large_patch14_224.yaml"),
  232. "supported_apis": ["train", "evaluate", "predict", "export"],
  233. "hpi_config_path": HPI_CONFIG_DIR / "CLIP_vit_large_patch14_224.yaml",
  234. }
  235. )
  236. register_model_info(
  237. {
  238. "model_name": "PP-HGNet_tiny",
  239. "suite": "Cls",
  240. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_tiny.yaml"),
  241. "supported_apis": ["train", "evaluate", "predict", "export"],
  242. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_tiny.yaml",
  243. }
  244. )
  245. register_model_info(
  246. {
  247. "model_name": "PP-HGNet_small",
  248. "suite": "Cls",
  249. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_small.yaml"),
  250. "supported_apis": ["train", "evaluate", "predict", "export"],
  251. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_small.yaml",
  252. }
  253. )
  254. register_model_info(
  255. {
  256. "model_name": "PP-HGNet_base",
  257. "suite": "Cls",
  258. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNet_base.yaml"),
  259. "supported_apis": ["train", "evaluate", "predict", "export"],
  260. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNet_base.yaml",
  261. }
  262. )
  263. register_model_info(
  264. {
  265. "model_name": "PP-HGNetV2-B0",
  266. "suite": "Cls",
  267. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B0.yaml"),
  268. "supported_apis": ["train", "evaluate", "predict", "export"],
  269. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B0.yaml",
  270. }
  271. )
  272. register_model_info(
  273. {
  274. "model_name": "PP-HGNetV2-B1",
  275. "suite": "Cls",
  276. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B1.yaml"),
  277. "supported_apis": ["train", "evaluate", "predict", "export"],
  278. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B1.yaml",
  279. }
  280. )
  281. register_model_info(
  282. {
  283. "model_name": "PP-HGNetV2-B2",
  284. "suite": "Cls",
  285. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B2.yaml"),
  286. "supported_apis": ["train", "evaluate", "predict", "export"],
  287. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B2.yaml",
  288. }
  289. )
  290. register_model_info(
  291. {
  292. "model_name": "PP-HGNetV2-B3",
  293. "suite": "Cls",
  294. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B3.yaml"),
  295. "supported_apis": ["train", "evaluate", "predict", "export"],
  296. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B3.yaml",
  297. }
  298. )
  299. register_model_info(
  300. {
  301. "model_name": "PP-HGNetV2-B4",
  302. "suite": "Cls",
  303. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B4.yaml"),
  304. "supported_apis": ["train", "evaluate", "predict", "export"],
  305. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B4.yaml",
  306. }
  307. )
  308. register_model_info(
  309. {
  310. "model_name": "PP-HGNetV2-B5",
  311. "suite": "Cls",
  312. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B5.yaml"),
  313. "supported_apis": ["train", "evaluate", "predict", "export"],
  314. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B5.yaml",
  315. }
  316. )
  317. register_model_info(
  318. {
  319. "model_name": "PP-HGNetV2-B6",
  320. "suite": "Cls",
  321. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B6.yaml"),
  322. "supported_apis": ["train", "evaluate", "predict", "export"],
  323. "hpi_config_path": HPI_CONFIG_DIR / "PP-HGNetV2-B6.yaml",
  324. }
  325. )
  326. register_model_info(
  327. {
  328. "model_name": "ResNet18",
  329. "suite": "Cls",
  330. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet18.yaml"),
  331. "supported_apis": ["train", "evaluate", "predict", "export"],
  332. "hpi_config_path": HPI_CONFIG_DIR / "ResNet18.yaml",
  333. }
  334. )
  335. register_model_info(
  336. {
  337. "model_name": "ResNet18_vd",
  338. "suite": "Cls",
  339. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet18_vd.yaml"),
  340. "supported_apis": ["train", "evaluate", "predict", "export"],
  341. "hpi_config_path": HPI_CONFIG_DIR / "ResNet18_vd.yaml",
  342. }
  343. )
  344. register_model_info(
  345. {
  346. "model_name": "ResNet34",
  347. "suite": "Cls",
  348. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet34.yaml"),
  349. "supported_apis": ["train", "evaluate", "predict", "export"],
  350. "hpi_config_path": HPI_CONFIG_DIR / "ResNet34.yaml",
  351. }
  352. )
  353. register_model_info(
  354. {
  355. "model_name": "ResNet34_vd",
  356. "suite": "Cls",
  357. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet34_vd.yaml"),
  358. "supported_apis": ["train", "evaluate", "predict", "export"],
  359. "hpi_config_path": HPI_CONFIG_DIR / "ResNet34_vd.yaml",
  360. }
  361. )
  362. register_model_info(
  363. {
  364. "model_name": "ResNet50",
  365. "suite": "Cls",
  366. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50.yaml"),
  367. "supported_apis": ["train", "evaluate", "predict", "export"],
  368. "hpi_config_path": HPI_CONFIG_DIR / "ResNet50.yaml",
  369. }
  370. )
  371. register_model_info(
  372. {
  373. "model_name": "ResNet50_vd",
  374. "suite": "Cls",
  375. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50_vd.yaml"),
  376. "supported_apis": ["train", "evaluate", "predict", "export"],
  377. "hpi_config_path": HPI_CONFIG_DIR / "ResNet50_vd.yaml",
  378. }
  379. )
  380. register_model_info(
  381. {
  382. "model_name": "ResNet101",
  383. "suite": "Cls",
  384. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet101.yaml"),
  385. "supported_apis": ["train", "evaluate", "predict", "export"],
  386. "hpi_config_path": HPI_CONFIG_DIR / "ResNet101.yaml",
  387. }
  388. )
  389. register_model_info(
  390. {
  391. "model_name": "ResNet101_vd",
  392. "suite": "Cls",
  393. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet101_vd.yaml"),
  394. "supported_apis": ["train", "evaluate", "predict", "export"],
  395. "hpi_config_path": HPI_CONFIG_DIR / "ResNet101_vd.yaml",
  396. }
  397. )
  398. register_model_info(
  399. {
  400. "model_name": "ResNet152",
  401. "suite": "Cls",
  402. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet152.yaml"),
  403. "supported_apis": ["train", "evaluate", "predict", "export"],
  404. "hpi_config_path": HPI_CONFIG_DIR / "ResNet152.yaml",
  405. }
  406. )
  407. register_model_info(
  408. {
  409. "model_name": "ResNet152_vd",
  410. "suite": "Cls",
  411. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet152_vd.yaml"),
  412. "supported_apis": ["train", "evaluate", "predict", "export"],
  413. "hpi_config_path": HPI_CONFIG_DIR / "ResNet152_vd.yaml",
  414. }
  415. )
  416. register_model_info(
  417. {
  418. "model_name": "ResNet200_vd",
  419. "suite": "Cls",
  420. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet200_vd.yaml"),
  421. "supported_apis": ["train", "evaluate", "predict", "export"],
  422. "hpi_config_path": HPI_CONFIG_DIR / "ResNet200_vd.yaml",
  423. }
  424. )
  425. register_model_info(
  426. {
  427. "model_name": "MobileNetV1_x0_25",
  428. "suite": "Cls",
  429. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_25.yaml"),
  430. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  431. "infer_config": "deploy/configs/inference_cls.yaml",
  432. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x0_25.yaml",
  433. }
  434. )
  435. register_model_info(
  436. {
  437. "model_name": "MobileNetV1_x0_5",
  438. "suite": "Cls",
  439. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_5.yaml"),
  440. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  441. "infer_config": "deploy/configs/inference_cls.yaml",
  442. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x0_5.yaml",
  443. }
  444. )
  445. register_model_info(
  446. {
  447. "model_name": "MobileNetV1_x0_75",
  448. "suite": "Cls",
  449. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x0_75.yaml"),
  450. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  451. "infer_config": "deploy/configs/inference_cls.yaml",
  452. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x0_75.yaml",
  453. }
  454. )
  455. register_model_info(
  456. {
  457. "model_name": "MobileNetV1_x1_0",
  458. "suite": "Cls",
  459. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV1_x1_0.yaml"),
  460. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  461. "infer_config": "deploy/configs/inference_cls.yaml",
  462. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV1_x1_0.yaml",
  463. }
  464. )
  465. register_model_info(
  466. {
  467. "model_name": "MobileNetV2_x0_25",
  468. "suite": "Cls",
  469. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x0_25.yaml"),
  470. "supported_apis": ["train", "evaluate", "predict", "export"],
  471. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x0_25.yaml",
  472. }
  473. )
  474. register_model_info(
  475. {
  476. "model_name": "MobileNetV2_x0_5",
  477. "suite": "Cls",
  478. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x0_5.yaml"),
  479. "supported_apis": ["train", "evaluate", "predict", "export"],
  480. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x0_5.yaml",
  481. }
  482. )
  483. register_model_info(
  484. {
  485. "model_name": "MobileNetV2_x1_0",
  486. "suite": "Cls",
  487. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x1_0.yaml"),
  488. "supported_apis": ["train", "evaluate", "predict", "export"],
  489. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x1_0.yaml",
  490. }
  491. )
  492. register_model_info(
  493. {
  494. "model_name": "MobileNetV2_x1_5",
  495. "suite": "Cls",
  496. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x1_5.yaml"),
  497. "supported_apis": ["train", "evaluate", "predict", "export"],
  498. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x1_5.yaml",
  499. }
  500. )
  501. register_model_info(
  502. {
  503. "model_name": "MobileNetV2_x2_0",
  504. "suite": "Cls",
  505. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV2_x2_0.yaml"),
  506. "supported_apis": ["train", "evaluate", "predict", "export"],
  507. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV2_x2_0.yaml",
  508. }
  509. )
  510. register_model_info(
  511. {
  512. "model_name": "MobileNetV3_large_x0_35",
  513. "suite": "Cls",
  514. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_35.yaml"),
  515. "supported_apis": ["train", "evaluate", "predict", "export"],
  516. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_35.yaml",
  517. }
  518. )
  519. register_model_info(
  520. {
  521. "model_name": "MobileNetV3_large_x0_5",
  522. "suite": "Cls",
  523. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_5.yaml"),
  524. "supported_apis": ["train", "evaluate", "predict", "export"],
  525. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_5.yaml",
  526. }
  527. )
  528. register_model_info(
  529. {
  530. "model_name": "MobileNetV3_large_x0_75",
  531. "suite": "Cls",
  532. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x0_75.yaml"),
  533. "supported_apis": ["train", "evaluate", "predict", "export"],
  534. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x0_75.yaml",
  535. }
  536. )
  537. register_model_info(
  538. {
  539. "model_name": "MobileNetV3_large_x1_0",
  540. "suite": "Cls",
  541. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x1_0.yaml"),
  542. "supported_apis": ["train", "evaluate", "predict", "export"],
  543. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x1_0.yaml",
  544. }
  545. )
  546. register_model_info(
  547. {
  548. "model_name": "MobileNetV3_large_x1_25",
  549. "suite": "Cls",
  550. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_large_x1_25.yaml"),
  551. "supported_apis": ["train", "evaluate", "predict", "export"],
  552. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x1_25.yaml",
  553. }
  554. )
  555. register_model_info(
  556. {
  557. "model_name": "MobileNetV3_small_x0_35",
  558. "suite": "Cls",
  559. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_35.yaml"),
  560. "supported_apis": ["train", "evaluate", "predict", "export"],
  561. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_large_x1_25.yaml",
  562. }
  563. )
  564. register_model_info(
  565. {
  566. "model_name": "MobileNetV3_small_x0_5",
  567. "suite": "Cls",
  568. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_5.yaml"),
  569. "supported_apis": ["train", "evaluate", "predict", "export"],
  570. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x0_5.yaml",
  571. }
  572. )
  573. register_model_info(
  574. {
  575. "model_name": "MobileNetV3_small_x0_75",
  576. "suite": "Cls",
  577. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x0_75.yaml"),
  578. "supported_apis": ["train", "evaluate", "predict", "export"],
  579. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x0_75.yaml",
  580. }
  581. )
  582. register_model_info(
  583. {
  584. "model_name": "MobileNetV3_small_x1_0",
  585. "suite": "Cls",
  586. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x1_0.yaml"),
  587. "supported_apis": ["train", "evaluate", "predict", "export"],
  588. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x1_0.yaml",
  589. }
  590. )
  591. register_model_info(
  592. {
  593. "model_name": "MobileNetV3_small_x1_25",
  594. "suite": "Cls",
  595. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV3_small_x1_25.yaml"),
  596. "supported_apis": ["train", "evaluate", "predict", "export"],
  597. "hpi_config_path": HPI_CONFIG_DIR / "MobileNetV3_small_x1_25.yaml",
  598. }
  599. )
  600. register_model_info(
  601. {
  602. "model_name": "MobileNetV4_conv_small",
  603. "suite": "Cls",
  604. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV4_conv_small.yaml"),
  605. "supported_apis": ["train", "evaluate", "predict", "export"],
  606. }
  607. )
  608. register_model_info(
  609. {
  610. "model_name": "MobileNetV4_conv_medium",
  611. "suite": "Cls",
  612. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV4_conv_medium.yaml"),
  613. "supported_apis": ["train", "evaluate", "predict", "export"],
  614. }
  615. )
  616. register_model_info(
  617. {
  618. "model_name": "MobileNetV4_conv_large",
  619. "suite": "Cls",
  620. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV4_conv_large.yaml"),
  621. "supported_apis": ["train", "evaluate", "predict", "export"],
  622. }
  623. )
  624. register_model_info(
  625. {
  626. "model_name": "MobileNetV4_hybrid_medium",
  627. "suite": "Cls",
  628. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV4_hybrid_medium.yaml"),
  629. "supported_apis": ["train", "evaluate", "predict", "export"],
  630. }
  631. )
  632. register_model_info(
  633. {
  634. "model_name": "MobileNetV4_hybrid_large",
  635. "suite": "Cls",
  636. "config_path": osp.join(PDX_CONFIG_DIR, "MobileNetV4_hybrid_large.yaml"),
  637. "supported_apis": ["train", "evaluate", "predict", "export"],
  638. }
  639. )
  640. register_model_info(
  641. {
  642. "model_name": "ConvNeXt_tiny",
  643. "suite": "Cls",
  644. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_tiny.yaml"),
  645. "supported_apis": ["train", "evaluate", "predict", "export"],
  646. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_tiny.yaml",
  647. }
  648. )
  649. register_model_info(
  650. {
  651. "model_name": "ConvNeXt_small",
  652. "suite": "Cls",
  653. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_small.yaml"),
  654. "supported_apis": ["train", "evaluate", "predict", "export"],
  655. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_small.yaml",
  656. }
  657. )
  658. register_model_info(
  659. {
  660. "model_name": "ConvNeXt_base_224",
  661. "suite": "Cls",
  662. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_base_224.yaml"),
  663. "supported_apis": ["train", "evaluate", "predict", "export"],
  664. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_base_224.yaml",
  665. }
  666. )
  667. register_model_info(
  668. {
  669. "model_name": "ConvNeXt_base_384",
  670. "suite": "Cls",
  671. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_base_384.yaml"),
  672. "supported_apis": ["train", "evaluate", "predict", "export"],
  673. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_base_384.yaml",
  674. }
  675. )
  676. register_model_info(
  677. {
  678. "model_name": "ConvNeXt_large_224",
  679. "suite": "Cls",
  680. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_large_224.yaml"),
  681. "supported_apis": ["train", "evaluate", "predict", "export"],
  682. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_large_224.yaml",
  683. }
  684. )
  685. register_model_info(
  686. {
  687. "model_name": "ConvNeXt_large_384",
  688. "suite": "Cls",
  689. "config_path": osp.join(PDX_CONFIG_DIR, "ConvNeXt_large_384.yaml"),
  690. "supported_apis": ["train", "evaluate", "predict", "export"],
  691. "hpi_config_path": HPI_CONFIG_DIR / "ConvNeXt_large_384.yaml",
  692. }
  693. )
  694. register_model_info(
  695. {
  696. "model_name": "StarNet-S1",
  697. "suite": "Cls",
  698. "config_path": osp.join(PDX_CONFIG_DIR, "StarNet-S1.yaml"),
  699. "supported_apis": ["train", "evaluate", "predict", "export"],
  700. }
  701. )
  702. register_model_info(
  703. {
  704. "model_name": "StarNet-S2",
  705. "suite": "Cls",
  706. "config_path": osp.join(PDX_CONFIG_DIR, "StarNet-S2.yaml"),
  707. "supported_apis": ["train", "evaluate", "predict", "export"],
  708. }
  709. )
  710. register_model_info(
  711. {
  712. "model_name": "StarNet-S3",
  713. "suite": "Cls",
  714. "config_path": osp.join(PDX_CONFIG_DIR, "StarNet-S3.yaml"),
  715. "supported_apis": ["train", "evaluate", "predict", "export"],
  716. }
  717. )
  718. register_model_info(
  719. {
  720. "model_name": "StarNet-S4",
  721. "suite": "Cls",
  722. "config_path": osp.join(PDX_CONFIG_DIR, "StarNet-S4.yaml"),
  723. "supported_apis": ["train", "evaluate", "predict", "export"],
  724. }
  725. )
  726. register_model_info(
  727. {
  728. "model_name": "FasterNet-L",
  729. "suite": "Cls",
  730. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-L.yaml"),
  731. "supported_apis": ["train", "evaluate", "predict", "export"],
  732. }
  733. )
  734. register_model_info(
  735. {
  736. "model_name": "FasterNet-M",
  737. "suite": "Cls",
  738. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-M.yaml"),
  739. "supported_apis": ["train", "evaluate", "predict", "export"],
  740. }
  741. )
  742. register_model_info(
  743. {
  744. "model_name": "FasterNet-S",
  745. "suite": "Cls",
  746. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-S.yaml"),
  747. "supported_apis": ["train", "evaluate", "predict", "export"],
  748. }
  749. )
  750. register_model_info(
  751. {
  752. "model_name": "FasterNet-T0",
  753. "suite": "Cls",
  754. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-T0.yaml"),
  755. "supported_apis": ["train", "evaluate", "predict", "export"],
  756. }
  757. )
  758. register_model_info(
  759. {
  760. "model_name": "FasterNet-T1",
  761. "suite": "Cls",
  762. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-T1.yaml"),
  763. "supported_apis": ["train", "evaluate", "predict", "export"],
  764. }
  765. )
  766. register_model_info(
  767. {
  768. "model_name": "FasterNet-T2",
  769. "suite": "Cls",
  770. "config_path": osp.join(PDX_CONFIG_DIR, "FasterNet-T2.yaml"),
  771. "supported_apis": ["train", "evaluate", "predict", "export"],
  772. }
  773. )
  774. register_model_info(
  775. {
  776. "model_name": "PP-LCNet_x1_0_ML",
  777. "suite": "Cls",
  778. "config_path": osp.join(PDX_CONFIG_DIR, "PP-LCNet_x1_0_ML.yaml"),
  779. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  780. "infer_config": "deploy/configs/inference_cls.yaml",
  781. "hpi_config_path": None,
  782. }
  783. )
  784. register_model_info(
  785. {
  786. "model_name": "ResNet50_ML",
  787. "suite": "Cls",
  788. "config_path": osp.join(PDX_CONFIG_DIR, "ResNet50_ML.yaml"),
  789. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  790. "infer_config": "deploy/configs/inference_cls.yaml",
  791. "hpi_config_path": None,
  792. }
  793. )
  794. register_model_info(
  795. {
  796. "model_name": "PP-HGNetV2-B0_ML",
  797. "suite": "Cls",
  798. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B0_ML.yaml"),
  799. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  800. "infer_config": "deploy/configs/inference_cls.yaml",
  801. "hpi_config_path": None,
  802. }
  803. )
  804. register_model_info(
  805. {
  806. "model_name": "PP-HGNetV2-B4_ML",
  807. "suite": "Cls",
  808. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B4_ML.yaml"),
  809. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  810. "infer_config": "deploy/configs/inference_cls.yaml",
  811. "hpi_config_path": None,
  812. }
  813. )
  814. register_model_info(
  815. {
  816. "model_name": "PP-HGNetV2-B6_ML",
  817. "suite": "Cls",
  818. "config_path": osp.join(PDX_CONFIG_DIR, "PP-HGNetV2-B6_ML.yaml"),
  819. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  820. "infer_config": "deploy/configs/inference_cls.yaml",
  821. "hpi_config_path": None,
  822. }
  823. )
  824. register_model_info(
  825. {
  826. "model_name": "CLIP_vit_base_patch16_448_ML",
  827. "suite": "Cls",
  828. "config_path": osp.join(PDX_CONFIG_DIR, "CLIP_vit_base_patch16_448_ML.yaml"),
  829. "supported_apis": ["train", "evaluate", "predict", "export", "infer"],
  830. "infer_config": "deploy/configs/inference_cls.yaml",
  831. "hpi_config_path": None,
  832. }
  833. )