register.py 25 KB

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