{"id":19899164,"url":"https://github.com/tootouch/cv_classification","last_synced_at":"2026-05-13T06:35:45.879Z","repository":{"id":154235341,"uuid":"613837967","full_name":"TooTouch/CV_classification","owner":"TooTouch","description":"Classification Pipeline in Computer Vision (Pytorch)","archived":false,"fork":false,"pushed_at":"2023-03-14T11:48:34.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T20:44:27.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TooTouch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-03-14T11:23:21.000Z","updated_at":"2023-04-24T13:28:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"5045c257-178d-4026-8988-4971b3aa3645","html_url":"https://github.com/TooTouch/CV_classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooTouch%2FCV_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooTouch%2FCV_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooTouch%2FCV_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooTouch%2FCV_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TooTouch","download_url":"https://codeload.github.com/TooTouch/CV_classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241329416,"owners_count":19944984,"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":[],"created_at":"2024-11-12T20:07:24.493Z","updated_at":"2026-05-13T06:35:45.844Z","avatar_url":"https://github.com/TooTouch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CV_classification\nClassification Pipeline in Computer Vision (Pytorch)\n\n# Environments\n\ndocker image: `nvcr.io/nvidia/pytorch:22.12-py3`\n\nsee details of NVIDIA pytorch docker image in [here](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-12.html#rel-22-12).\n\n# Directory\n\n```bash\nCV_classification\n├── datasets\n│   ├── __init__.py\n│   ├── augmentation.py\n│   └── factory.py\n├── models\n│   ├── __init__.py\n│   └── resnet.py\n├── log.py\n├── main.py\n├── train.py\n├── run.sh\n├── requirements.txt\n├── README.md\n└── LICENSE\n```\n\n# Pipeline\n\n0. Set seed\n1. Make directory to save results\n2. Build model\n3. Build dataset with augmentations\n   - Train dataset\n   - Validation dataset (optional)\n   - Test dataset \n4. Make dataLoader\n5. Define optimizer (model parameters)\n6. Define loss function\n7. Training model\n   - Checkpoint model using evaluation on validation dataset\n   - Log training history using `logging` or `wandb` in save folder\n8. Testing model\n\n\n# Run\n\n`run.sh`\n\n```bash\ndataname=$1\nnum_classes=$2\nopt_list='SGD Adam'\nlr_list='0.1 0.01 0.001'\naug_list='default weak strong'\nbs_list='16 64 256'\n\nfor bs in $bs_list\ndo\n    for opt in $opt_list\n    do\n        for lr in $lr_list\n        do\n            for aug in $aug_list\n            do\n                # use scheduler\n                echo \"bs: $bs, opt: $opt, lr: $lr, aug: $aug, use_sched: True\"\n                EXP_NAME=\"bs_$bs-opt_$opt-lr_$lr-aug_$aug-use_sched\"\n                \n                if [ -d \"$EXP_NAME\" ]\n                then\n                    echo \"$EXP_NAME is exist\"\n                else\n                    python main.py \\\n                        --exp-name $EXP_NAME \\\n                        --dataname $dataname \\\n                        --num-classes $num_classes \\\n                        --opt-name $opt \\\n                        --aug-name $aug \\\n                        --batch-size $bs \\\n                        --lr $lr \\\n                        --use_scheduler \\\n                        --epochs 50\n                fi\n\n                # not use scheduler\n                echo \"bs: $bs, opt: $opt, lr: $lr, aug: $aug, use_sched: False\"\n                EXP_NAME=\"bs_$bs-opt_$opt-lr_$lr-aug_$aug\"\n\n                if [ -d \"$EXP_NAME\" ]\n                then\n                    echo \"$EXP_NAME is exist\"\n                else\n                    python main.py \\\n                        --exp-name $EXP_NAME \\\n                        --dataname $dataname \\\n                        --num-classes $num_classes \\\n                        --opt-name $opt \\\n                        --aug-name $aug \\\n                        --batch-size $bs \\\n                        --lr $lr \\\n                        --epochs 50\n                fi\n            done\n        done\n    done\ndone\n```\n\n\n**example**\n\n```bash\nbash run.sh CIFAR10 10\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftootouch%2Fcv_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftootouch%2Fcv_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftootouch%2Fcv_classification/lists"}