register.py 26 KB

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