register.py 29 KB

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