{"id":13738454,"url":"https://github.com/major196512/vistem","last_synced_at":"2025-05-08T16:34:07.914Z","repository":{"id":215989993,"uuid":"287187456","full_name":"major196512/vistem","owner":"major196512","description":"General Vision Model Training Template","archived":false,"fork":false,"pushed_at":"2020-11-12T16:27:02.000Z","size":514,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T03:12:35.258Z","etag":null,"topics":["pytorch","vision-models"],"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/major196512.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-13T05:15:03.000Z","updated_at":"2023-12-16T07:03:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"24528824-2389-46b9-9e08-5b929e177cc0","html_url":"https://github.com/major196512/vistem","commit_stats":null,"previous_names":["major196512/vistem"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/major196512%2Fvistem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/major196512%2Fvistem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/major196512%2Fvistem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/major196512%2Fvistem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/major196512","download_url":"https://codeload.github.com/major196512/vistem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224746759,"owners_count":17363108,"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","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":["pytorch","vision-models"],"created_at":"2024-08-03T03:02:22.962Z","updated_at":"2024-11-15T07:31:10.320Z","avatar_url":"https://github.com/major196512.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"40%\" src=\"./img/pytorch.png\"\u003e\u003c/p\u003e\n\n# VISTEM : Vision Model Training Template\nTrain and evaluate all of present Object Detection and Segmentation models. \n\nAlthough previous projects implement multiple models(Detectron2, MMDetection and so on), these are missingsome of vision models.  Our goal is to implement all of models by only using our project.\n\n# Installation\n## Requirements\n- PyTorch : \u003e=1.5\n- TensorFlow : \u003e=1.15.0\n- CUDA : \u003e=10.2\n\n## Setup\n```bash\ngit clone https://github.com/major196512/vistem\npython -m pip install -e vistem\ncd vistem\nln -s $PRETRAINED pretrained_weights\nln -s $DATA data\n```\n`$PRETRAINED` : the directory of pretrained backbone network weights(download pretrained models from [here](https://drive.google.com/drive/folders/18xcK6pS3bapqHaU0UQ2jSQ1eE1bn0iuK?usp=sharing))\n\n`$DATA` : the directory of datasets(See [here](./vistem/loader/data) for more information).\n\n# Performance\n\n## Pascal VOC\nWe train our models with 8-gpu and 16 images per batch.\n\n| Meta \u003cbr\u003eArchitecture | Backbone \u003cbr\u003eNetwork | BBox \u003cbr\u003eAP | BBox \u003cbr\u003eAP50 | BBox \u003cbr\u003eAP75 | Config File |\n| :---:                 | :---:                   | :---:       | :---:         | :---:         | :---:       |\n| [RetinaNet](https://drive.google.com/file/d/17Ygzh4kVOQIwfpgejpvIhD9tCS1_yaqB/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 55.533 | 81.730 | 60.504 | [retinanet_R50_FPN](./configs/VOC-Detection/retinanet_R50_FPN.yaml) |\n| [RetinaNet]() | ResNet-50\u003cbr\u003ewith NAS-FPN | In Progress |  |  | [retinanet_R50_NASFPN](./configs/VOC-Detection/retinanet_R50_NASFPN.yaml) |\n| [Faster RCNN](https://drive.google.com/file/d/1om1m7a77_ZYTcDCwEcXmv8Xx8IUgysYc/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 54.282 | 81.827 | 60.048 | [faster_R50_FPN](./configs/VOC-Detection/faster_R50_FPN.yaml) |\n| [Faster RCNN]() | ResNet-50\u003cbr\u003ewith NAS-FPN | In Progress |  |  | [faster_R50_NASFPN](./configs/VOC-Detection/faster_R50_NASFPN.yaml) |\n| CornerNet | ResNet-50\u003cbr\u003ewith FPN | In Progress | | | |\n| RepPoints | ResNet-50\u003cbr\u003ewith FPN | In Progress | | | |\n\nWhen training using `Gradient Accumulation`, you must assign a `cfg.SOLVER.ACUUMULATE` and `cfg.SOLVER.IMG_PER_BATCH` in config file.\nIn this table below, we run our models with 4 gradient accumulation and 4 images per batch with 2-gpu.\n\n| Meta \u003cbr\u003eArchitecture | Backbone \u003cbr\u003eNetwork | BBox \u003cbr\u003eAP   | BBox \u003cbr\u003eAP50 | BBox \u003cbr\u003eAP75 |\n| :---:             | :---:     | :---:     | :---:     | :---:     |\n| [RetinaNet](https://drive.google.com/file/d/17akQ5GgxWgVYWZb57rzjEQZo0ZF197zI/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 51.011 | 79.542 | 54.105 |\n| [RetinaNet]() | ResNet-50\u003cbr\u003ewith NAS-FPN | In Progress |  |  |\n| [Faster RCNN](https://drive.google.com/file/d/1228vNhWED2M_Iv0tT0LpUHp5CIf6rypa/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 49.928 | 80.683 | 53.101 |\n| [Faster RCNN]() | ResNet-50\u003cbr\u003ewith NAS-FPN | In Progress |  |  |\n| CornerNet | ResNet-50\u003cbr\u003ewith FPN | In Progress | | |\n| RepPoints | ResNet-50\u003cbr\u003ewith FPN | In Progress | | |\n\n## MS-COCO\nIn training MS-COCO datasets, We only evaluate with 8-gpu settings.\n| Meta \u003cbr\u003eArchitecture | Backbone \u003cbr\u003eNetwork | BBox \u003cbr\u003eAP   | Config File   |\n| :---:                 | :---:         | :---:         | :---:         |\n| [RetinaNet](https://drive.google.com/file/d/1Tyq3O56WkbdVVOpTBNlcC1vf620Z6Czv/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 36.524 | [retinanet_R50_FPN](./configs/COCO-Detection/retinanet_R50_FPN.yaml) |\n| [RetinaNet]() | ResNet-50\u003cbr\u003ewith FPN | In Progress | [retinanet_R50_NASFPN](./configs/COCO-Detection/retinanet_R50_NASFPN.yaml) |\n| [Faster RCNN](https://drive.google.com/file/d/1fC1G--BwGabal2Pe1rFt2m_WZUmgKcdT/view?usp=sharing) | ResNet-50\u003cbr\u003ewith FPN | 38.021 | [faster_R50_FPN](./configs/COCO-Detection/faster_R50_FPN.yaml) |\n| [Faster RCNN]() | ResNet-50\u003cbr\u003ewith NAS-FPN | In Progress | [faster_R50_NASFPN](./configs/COCO-Detection/faster_R50_NASFPN.yaml) |\n| CornerNet              | ResNet-50\u003cbr\u003ewith FPN| In Progress|          |\n| RepPoints              | ResNet-50\u003cbr\u003ewith FPN| In Progress|          |\n\n# Training\n## Single Machine\n\nWhen training in a single machine, you should only specify `--config-file` and `--num-gpu` in argument.\nYou can select the training model and datasets by using or modifying a [config file](./configs). For more information about factors in config, see [here](./vistem/config/defaults/README.md).\n\n```bash\npython tools/train.py --config-file ./configs/RetinaNet/VOC-Detection/R50_FPN_1x_8gpu.yaml --num-gpu 8\n```\n\nIf you want to resume training, just set `--resume` in argument.\n```bash\npython tools/train.py --config-file ./configs/RetinaNet/VOC-Detection/R50_FPN_1x_8gpu.yaml --num-gpu 8 --resume\n```\n\n## Multi Machine\n[For collective communication](https://pytorch.org/tutorials/intermediate/dist_tuto.html#collective-communication) in pytorch, it needs to execute process in main machine.\nThey automatically set main machine IP address and unused port number for TCP communication.\n\nFor main process, you must set `machine-rank` to zero and `num-machine` to the number of machines.\n```bash\npython tools/train.py --config-file ./configs/train.yaml --num-gpu 4 --num-machine 2 --machine-rank 0\n```\n\nIn other machines, you clarify `machine-rank` and must set `dist-ip` and `dist-port` arguments which is the same with main machine values.\n```bash\npython tools/train.py --config-file ./configs/train.yaml --num-gpu 4 --num-machine 2 --machine-rank 1 --dist-ip xxx.xxx.xxx.xxx --dist-port xxxx\n```\n\n# Evaluation\n```bash\npython tools/test.py --config-file ./configs/test.yaml --eval-only\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajor196512%2Fvistem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajor196512%2Fvistem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajor196512%2Fvistem/lists"}