{"id":28372196,"url":"https://github.com/asthestarsfalll/convnext-megengine","last_synced_at":"2025-08-26T15:28:06.562Z","repository":{"id":55064907,"uuid":"522772457","full_name":"Asthestarsfalll/ConvNeXt-MegEngine","owner":"Asthestarsfalll","description":"The MegEngine Implementation of ConvNeXt.","archived":false,"fork":false,"pushed_at":"2022-08-10T05:17:58.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T15:39:12.566Z","etag":null,"topics":["megengine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asthestarsfalll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-09T02:16:35.000Z","updated_at":"2022-08-10T04:57:15.000Z","dependencies_parsed_at":"2022-08-14T10:50:24.994Z","dependency_job_id":null,"html_url":"https://github.com/Asthestarsfalll/ConvNeXt-MegEngine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Asthestarsfalll/ConvNeXt-MegEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthestarsfalll%2FConvNeXt-MegEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthestarsfalll%2FConvNeXt-MegEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthestarsfalll%2FConvNeXt-MegEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthestarsfalll%2FConvNeXt-MegEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asthestarsfalll","download_url":"https://codeload.github.com/Asthestarsfalll/ConvNeXt-MegEngine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthestarsfalll%2FConvNeXt-MegEngine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272233850,"owners_count":24896896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["megengine"],"created_at":"2025-05-29T13:14:20.627Z","updated_at":"2025-08-26T15:28:06.547Z","avatar_url":"https://github.com/Asthestarsfalll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConvNeXt-MegEngine\n\nThe MegEngine Implementation of ConvNeXt.\n\n## Usage\n\nInstall dependency.\n\n```bash\npip install -r requirements.txt\n```\n\nConvert trained weights from torch to megengine, the converted weights will be save in ./pretained/\n\n```bash\npython convert_weights.py -m convnext_tiny_1k\n```\n\nTest on ImageNet (Not sure whether it will work)\n\n```bash\npython test.py -h\n```\n\n```bash\npython test.py --arch convnext_tiny_1k --ckpt path/to/ckpt --ngpus 1 --workers 8 --print-freq 20 --val-batch-size 16\n```\n\nImport from megengine.hub:\n\nWay 1:\n\n```python\nfrom  megengine import hub\nmodelhub = hub.import_module(repo_info='asthestarsfalll/convnext-megengine', git_host='github.com')\n\n# load ConvNeXt model and custom on you own\nconvnext = modelhub.ConvNeXt(num_classes=10, depths=[3, 3, 27, 3], dims=[256, 512, 1024, 2048])\n\n# load pretrained model \npretrained_model = modelhub.convnext_tiny(pretrained=True) \n```\n\nWay 2:\n\n```python\nfrom  megengine import hub\n\n# load ConvNeXt model and custom on you own\nmodel_name = 'ConvNeXt'\nkwards = dict(\n    num_classes=10, depths=[3, 3, 27, 3], dims=[256, 512, 1024, 2048]\n)\nmodel = hub.load(\n    repo_info='asthestarsfalll/convnext-megengine', entry=model_name, git_host='github.com', **kwards)\n\n# load pretrained model \nmodel_name = 'convnext_tiny'\npretrained_model = hub.load(\n    repo_info='asthestarsfalll/convnext-megengine', entry=model_name, git_host='github.com', pretrained=True)\n```\n\nCurrently only support convnext_tiny, you can run convert_weights.py to convert other models.\nFor example:\n\n```bash\n  python convert_weights.py -m convnext_small_1k\n```\n\nThen load state dict manually.\n\n```python\nmodel = modelhub.convnext_small()\nmodel.load_state_dict(mge.load('./pretrained/convnext_small_1k.pkl'))\n# or\nmodel_name = 'convnext_small'\nmodel = hub.load(\n    repo_info='asthestarsfalll/convnext-megengine', entry=model_name, git_host='github.com')\nmodel.load_state_dict(mge.load('./pretrained/convnext_small_1k.pkl'))\n```\n\n## TODO\n\n- [ ] add object detection codes\n- [ ] add semantic segmentation codes\n- [ ] add train codes\n\n## Reference\n\n[The official implementation of ConvNeXt](https://github.com/facebookresearch/ConvNeXt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasthestarsfalll%2Fconvnext-megengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasthestarsfalll%2Fconvnext-megengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasthestarsfalll%2Fconvnext-megengine/lists"}