{"id":17330590,"url":"https://github.com/yoshitomo-matsubara/supervised-compression","last_synced_at":"2025-04-14T17:31:06.298Z","repository":{"id":42457122,"uuid":"318041200","full_name":"yoshitomo-matsubara/supervised-compression","owner":"yoshitomo-matsubara","description":"[WACV 2022] \"Supervised Compression for Resource-Constrained Edge Computing Systems\"","archived":false,"fork":false,"pushed_at":"2023-06-16T04:01:13.000Z","size":1224,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-01T05:32:46.015Z","etag":null,"topics":["coco","image-classification","imagenet","knowledge-distillation","object-detection","pytorch","semantic-segmentation","split-computing","supervised-compression"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoshitomo-matsubara.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}},"created_at":"2020-12-03T01:38:05.000Z","updated_at":"2024-06-13T04:25:47.000Z","dependencies_parsed_at":"2022-08-27T06:12:36.841Z","dependency_job_id":null,"html_url":"https://github.com/yoshitomo-matsubara/supervised-compression","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fsupervised-compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fsupervised-compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fsupervised-compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fsupervised-compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshitomo-matsubara","download_url":"https://codeload.github.com/yoshitomo-matsubara/supervised-compression/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639403,"owners_count":17177816,"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":["coco","image-classification","imagenet","knowledge-distillation","object-detection","pytorch","semantic-segmentation","split-computing","supervised-compression"],"created_at":"2024-10-15T14:51:42.394Z","updated_at":"2024-11-08T06:03:47.677Z","avatar_url":"https://github.com/yoshitomo-matsubara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supervised Compression for Resource-Constrained Edge Computing Systems\nThis is the official repository for our WACV 2022 paper, \n***\"Supervised Compression for Resource-Constrained Edge Computing Systems\"***.\n\nIn resource-constrained edge computing systems, we often have mobile devices with weak computing resource, \nbattery constraint, and limited communication capacity (e.g., low data rate). \nOne of the solutions is split computing, that literally splits a trained neural network into head and tail models \ndeployed on mobile device (weak) and edge server (stronger).\nHead model should be lightweight encoders and compress the input data (i.e., save both computational load on \nmobile device and communication cost from mobile device to edge server), and tail models decode the compressed data \nand complete the inference.\nNote that the training process is done offline (i.e., on single machines).\n\n## Update: Extended version of this WACV paper\n[Our new work](https://github.com/yoshitomo-matsubara/sc2-benchmark#citation) is built on this project, and \nwe significantly extended this work and defined supervised compression for split computing (SC2).\nWe introduced new benchmark metrics and published `sc2bench`, a pip-installable Python package for SC2 problems.\nWe also conducted even larger-scale experiments. \nThe more advanced project with code and preprint are available [here](https://github.com/yoshitomo-matsubara/sc2-benchmark).  \n\n## Input Compression vs. Supervised Compression\n![Input compression vs. Supervised compression](imgs/input_vs_feature_compression.png)\n\nDifferent from a combination of input compression and supervised model (**top**), supervised compression (**bottom**) \ndoes not reconstruct the original input from the compressed representation, that usually contains information unrelated \nto supervised downstream tasks. In split computing, we need to relax computational load on mobile device \n(e.g., by designing a lightweight encoder), compress data to be transferred from weak mobile device to \nstronger edge server, and save the end-to-end input-to-prediction latency while preserving the original model accuracy. \n\n## Proposed Supervised Compression\n![Proposed training method](imgs/proposed_training_method.png) \n\nWe leverage a concept of neural image compression and introduced encoder and decoder to a teacher model in place of \nall the layers before its 2nd residual block.\n\nOur supervised compression method consists of 1) learning to mimic a teacher's intermediate features and a prior for \nentropy coding to compress data to be transferred and 2) fine-tuning the decoder and remaining layers for a target\ndownstream task so that a single encoder can serve multiple downstream tasks e.g., one-time encoding on mobile device \nwhile edge server can use the encoded data for multiple tasks with multiple tail models.\nIn the above figure, we use an image classification with knowledge distillation as an example. The trained classifier \ncan be used as backbone for other downstream tasks such as object detection and semantic segmentation.\n\n## Citation\n[[Paper](https://openaccess.thecvf.com/content/WACV2022/html/Matsubara_Supervised_Compression_for_Resource-Constrained_Edge_Computing_Systems_WACV_2022_paper.html)] [[Preprint](https://arxiv.org/abs/2108.11898)]\n```bibtex\n@inproceedings{matsubara2022supervised,\n  title={{Supervised Compression for Resource-Constrained Edge Computing Systems}},\n  author={Matsubara, Yoshitomo and Yang, Ruihan and Levorato, Marco and Mandt, Stephan},\n  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},\n  pages={2685-2695},\n  month={January},\n  year={2022}\n}\n```\n\n## Requirements\n- Python \u003e= 3.6.9\n- pipenv\n\n\n## 0. Download Checkpoints\nTo replicate the supervised performance reported in the paper, download the checkpoints of our trained models from \neither [GitHub Release](https://github.com/yoshitomo-matsubara/supervised-compression/releases/tag/google_drive-to-github) or \n[Baidu Wangpan (PIN: lk2f)](https://pan.baidu.com/s/15KLKPznga66b6SqSiep7Qg).  \nUnzip the downloaded file at the root directory of this repository i.e.,\n\n```\n- supervised-compression/\n  - resource/\n```\n\n## 1. Virtual Environment Setup\nIt is highly recommended that you use a virtual environment (e.g., pipenv, anaconda). We use pipenv in this repository. \nRefer to [Pipfile](https://github.com/yoshitomo-matsubara/supervised-compression/blob/main/Pipfile) for the required packages.\n\n```shell\n# For Python 3.6 users\npipenv install --python 3.6\n\n# For Python 3.7 users\npipenv install --python 3.7\n\n# For Python 3.8 users\npipenv install --python 3.8\n```\n\n## 2. Download Datasets\n\n### 2.1 ImageNet (ILSVRC 2012): Image Classification\nAs the terms of use do not allow to distribute the URLs, \nyou will have to create an account [here](http://image-net.org/download) to get the URLs, \nand replace `${TRAIN_DATASET_URL}` and `${VAL_DATASET_URL}` with them.\n\n```shell\nwget ${TRAIN_DATASET_URL} ./\nwget ${VAL_DATASET_URL} ./\n```\n\nUntar and extract files\n\n```shell\nmkdir ~/dataset/ilsvrc2012/{train,val} -p\nmv ILSVRC2012_img_train.tar ~/dataset/ilsvrc2012/train/\ncd ~/dataset/ilsvrc2012/train/\ntar -xvf ILSVRC2012_img_train.tar\nmv ILSVRC2012_img_train.tar ../\nfor f in *.tar; do\n  d=`basename $f .tar`\n  mkdir $d\n  (cd $d \u0026\u0026 tar xf ../$f)\ndone\nrm -r *.tar\n\nmv ILSVRC2012_img_val.tar ~/dataset/ilsvrc2012/val/\nwget https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh\nmv valprep.sh ~/dataset/ilsvrc2012/val/\ncd ~/dataset/ilsvrc2012/val/\ntar -xvf ILSVRC2012_img_val.tar\nmv ILSVRC2012_img_val.tar ../\nsh valprep.sh\nmv valprep.sh ../\n```\n\n\n### 2.2 COCO 2017: Object Detection \u0026 Semantic Segmentation\nDownload and unzip the datasets\n\n```shell\nmkdir ~/dataset/coco2017/ -p\ncd ~/dataset/coco2017/\nwget http://images.cocodataset.org/zips/train2017.zip ./\nwget http://images.cocodataset.org/zips/val2017.zip ./\nwget http://images.cocodataset.org/annotations/annotations_trainval2017.zip ./\nunzip train2017.zip\nunzip val2017.zip\nunzip annotations_trainval2017.zip\n```\n\n### 3. Input Compression (IC) Baselines\n\n#### JPEG Codec\n\n```shell\n# Image classification\necho 'jpeg quality=100'\npipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/jpeg-resnet50.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'jpeg quality=${next_quality}'\n  sed -i \"s/jpeg_quality: ${quality}/jpeg_quality: ${next_quality}/\" configs/ilsvrc2012/input_compression/jpeg-resnet50.yaml\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/jpeg-resnet50.yaml\ndone\n\n# Object detection\necho 'jpeg quality=100'\npipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/jpeg-retinanet_resnet50_fpn.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'jpeg quality=${next_quality}'\n  sed -i \"s/jpeg_quality: ${quality}/jpeg_quality: ${next_quality}/\" configs/coco2017/input_compression/jpeg-retinanet_resnet50_fpn.yaml\n  pipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/jpeg-retinanet_resnet50_fpn.yaml\ndone\n\n# Semantic segmentation\necho 'jpeg quality=100'\npipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/jpeg-deeplabv3_resnet50.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'jpeg quality=${next_quality}'\n  sed -i \"s/jpeg_quality: ${quality}/jpeg_quality: ${next_quality}/\" configs/coco2017/input_compression/jpeg-deeplabv3_resnet50.yaml\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/jpeg-deeplabv3_resnet50.yaml\ndone\n```\n\n#### WebP Codec\n\n```shell\n# Image classification\necho 'webp quality=100'\npipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/webp-resnet50.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'webp quality=${next_quality}'\n  sed -i \"s/webp_quality: ${quality}/webp_quality: ${next_quality}/\" configs/ilsvrc2012/input_compression/webp-resnet50.yaml\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/webp-resnet50.yaml\ndone\n\n# Object detection\necho 'webp quality=100'\npipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/webp-retinanet_resnet50_fpn.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'webp quality=${next_quality}'\n  sed -i \"s/webp_quality: ${quality}/webp_quality: ${next_quality}/\" configs/coco2017/input_compression/webp-retinanet_resnet50_fpn.yaml\n  pipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/webp-retinanet_resnet50_fpn.yaml\ndone\n\n# Semantic segmentation\necho 'webp quality=100'\npipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/webp-deeplabv3_resnet50.yaml\n\nfor quality in $(seq 100 -10 20)\ndo\n  next_quality=$((quality-10))\n  echo 'webp quality=${next_quality}'\n  sed -i \"s/webp_quality: ${quality}/webp_quality: ${next_quality}/\" configs/coco2017/input_compression/webp-deeplabv3_resnet50.yaml\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/webp-deeplabv3_resnet50.yaml\ndone\n```\n\n#### BPG Codec\nInstall BPG following the instructions [here](https://bellard.org/bpg/).  \nIf you do not place **bpgenc** and **bpgdec** at '~/manually_installed/libbpg-0.9.8/', \nedit the `encoder_path` and `decoder_path` in `bpg-resnet.yaml` like [this](https://github.com/yoshitomo-matsubara/supervised-compression/blob/main/configs/ilsvrc2012/input_compression/bpg-resnet50.yaml#L19-L20).\n\n```shell\n# Image classification\necho 'bpg quality=50'\npipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/bpg-resnet50.yaml\n\nfor quality in $(seq 50 -5 5)\ndo\n  next_quality=$((quality-5))\n  echo 'bpg quality=${next_quality}'\n  sed -i \"s/bpg_quality: ${quality}/bpg_quality: ${next_quality}/\" configs/ilsvrc2012/input_compression/bpg-resnet50.yaml\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/bpg-resnet50.yaml\ndone\n\n# Object detection\necho 'bpg quality=50'\npipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/bpg-retinanet_resnet50_fpn.yaml\n\nfor quality in $(seq 50 -5 5)\ndo\n  next_quality=$((quality-5))\n  echo 'bpg quality=${next_quality}'\n  sed -i \"s/bpg_quality: ${quality}/bpg_quality: ${next_quality}/\" configs/coco2017/input_compression/bpg-retinanet_resnet50_fpn.yaml\n  pipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/bpg-retinanet_resnet50_fpn.yaml\ndone\n\n# Semantic segmentation\necho 'bpg quality=50'\npipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/bpg-deeplabv3_resnet50.yaml\n\nfor quality in $(seq 50 -5 5)\ndo\n  next_quality=$((quality-5))\n  echo 'bpg quality=${next_quality}'\n  sed -i \"s/bpg_quality: ${quality}/bpg_quality: ${next_quality}/\" configs/coco2017/input_compression/bpg-deeplabv3_resnet50.yaml\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/bpg-deeplabv3_resnet50.yaml\ndone\n```\n\n#### Factorized Prior\nJohannes Ballé, David Minnen, Saurabh Singh, Sung Jin Hwang, and Nick Johnston. \"Variational image compression with a scale hyperprior\"  \n\nMake sure you have downloaded and unzipped the pretrained checkpoints for this model. The checkpoint files should be \nplaced at `./resource/ckpt/input_compression/` as specified in the yaml file.\n\n```shell\n# Image classification\necho 'beta=0.00015625'\npipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/factorized_prior_ae_128ch-resnet50.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/ilsvrc2012/input_compression/factorized_prior_ae_128ch-resnet50.yaml\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/factorized_prior_ae_128ch-resnet50.yaml\n  prev_beta=${beta}\ndone\n\n# Object detection\necho 'beta=0.00015625'\npipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/factorized_prior_ae_128ch-retinanet_resnet50_fpn.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/coco2017/input_compression/factorized_prior_ae_128ch-retinanet_resnet50_fpn.yaml\n  pipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/factorized_prior_ae_128ch-retinanet_resnet50_fpn.yaml\n  prev_beta=${beta}\ndone\n\n# Semantic segmentation\necho 'beta=0.00015625'\npipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/factorized_prior_ae_128ch-deeplabv3_resnet50.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/coco2017/input_compression/factorized_prior_ae_128ch-deeplabv3_resnet50.yaml\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/factorized_prior_ae_128ch-deeplabv3_resnet50.yaml\n  prev_beta=${beta}\ndone\n```\n\n\n#### Mean-scale Hyperprior \nDavid Minnen, Johannes Ballé, and George D Toderici. \"Joint autoregressive and hierarchical priors for learned image compression\"  \n\nMake sure you have downloaded and unzipped the pretrained checkpoints for this model. The checkpoint files should be \nplaced at `./resource/ckpt/input_compression/` as specified in the yaml file.\n\n```shell\n# Image classification\necho 'beta=0.00015625'\npipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/hierarchical_prior_ae_128ch-resnet50.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/ilsvrc2012/input_compression/hierarchical_prior_ae_128ch-resnet50.yaml\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/input_compression/hierarchical_prior_ae_128ch-resnet50.yaml\n  prev_beta=${beta}\ndone\n\n# Object detection\necho 'beta=0.00015625'\npipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/hierarchical_prior_ae_128ch-retinanet_resnet50_fpn.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/coco2017/input_compression/hierarchical_prior_ae_128ch-retinanet_resnet50_fpn.yaml\n  pipenv run python object_detection.py -test_only --config configs/coco2017/input_compression/hierarchical_prior_ae_128ch-retinanet_resnet50_fpn.yaml\n  prev_beta=${beta}\ndone\n\n# Semantic segmentation\necho 'beta=0.00015625'\npipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/hierarchical_prior_ae_128ch-deeplabv3_resnet50.yaml\nprev_beta=0.00015625\n\nfor beta in 0.0003125 0.000625 0.00125 0.0025 0.005 0.01 0.02\ndo\n  echo 'beta=${beta}'\n  sed -i \"s/beta_${prev_beta}/beta_${beta}/\" configs/coco2017/input_compression/hierarchical_prior_ae_128ch-deeplabv3_resnet50.yaml\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/input_compression/hierarchical_prior_ae_128ch-deeplabv3_resnet50.yaml\n  prev_beta=${beta}\ndone\n```\n\n### 4. Feature Compression (FC) Baselines\nIf you want to train models yourself by the baselines, exclude `-test_only` from the following commands.\n\n#### Channel Reduction and Bottleneck Quantization\nYoshitomo Matsubara, Marco Levorato. [\"Neural Compression and Filtering for Edge-assisted Real-time Object Detection in Challenged Networks\"](https://github.com/yoshitomo-matsubara/hnd-ghnd-object-detectors)  \n\nMake sure you have downloaded and unzipped the pretrained checkpoints for this model. The checkpoint files should be \nplaced at `./resource/ckpt/ilsvrc2012/bq/` and  `./resource/ckpt/coco2017/bq/` as specified in the yaml file.\n\n```shell\n# Image classification\nfor bch in 12 9 6 3 2\ndo\n  echo 'bottleneck channel=${bch}'\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/bq/custom_resnet50-bq${bch}ch_from_resnet50.yaml\ndone\n\n# Object detection\nfor bch in 6 3 2 1\ndo\n  echo 'bottleneck channel=${bch}'\n  pipenv run python object_detection.py -test_only --config configs/coco2017/bq/custom_retinanet_resnet50_fpn-bq${bch}ch_from_retinanet_resnet50_fpn.yaml\ndone\n\n# Semantic segmentation\nfor bch in 9 6 3 2 1\ndo\n  echo 'bottleneck channel=${bch}'\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/bq/custom_deeplabv3_resnet50_bq${bch}ch_from_deeplabv3_resnet50.yaml\ndone\n```\n\n#### End-to-end training\nSaurabh Singh, Sami Abu-El-Haija, Nick Johnston, Johannes Ballé, Abhinav Shrivastava, George Toderici. \"End-to-End Learning of Compressible Features\"  \n\nMake sure you have downloaded and unzipped the pretrained checkpoints for this model. The checkpoint files should be \nplaced at `./resource/ckpt/ilsvrc2012/singh_et_al/` and `./resource/ckpt/coco2017/shared_singh_et_al/` as specified in the yaml file.\n\n```shell\n# Image classification\nfor beta in 5.0e-11 1.0e-10 2.0e-10 4.0e-10 8.0e-10 1.6e-9 6.4e-9 1.28e-8\ndo\n  echo 'beta=${beta}'\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/singh_et_al/bottleneck_resnet50-b24ch_igdn-beta${beta}_from_resnet50.yaml\ndone\n\n# Object detection\nfor beta in 8.0e-10 1.6e-9 6.4e-9 1.28e-8\ndo\n  echo 'beta=${beta}'\n  pipenv run python object_detection.py -test_only --config configs/coco2017/shared_singh_et_al/retinanet_bottleneck_resnet50-b24ch_igdn-beta${beta}_fpn.yaml\ndone\n\n# Semantic segmentation\nfor beta in 8.0e-10 1.6e-9 6.4e-9 1.28e-8\ndo\n  echo 'beta=${beta}'\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/shared_singh_et_al/deeplabv3_bottleneck_resnet50-b24ch_igdn-beta${beta}.yaml\ndone\n```\n\n### 5. Our supervised compression\nMake sure you have downloaded and unzipped the pretrained checkpoints for this model. The checkpoint files should be \nplaced at `./resource/ckpt/ilsvrc2012/entropic_student/` and `./resource/ckpt/coco2017/shared_entropic_student/` \nas specified in the yaml file.\n\nIf you want to train models yourself by the baselines, exclude `-test_only` from the following commands.\n\n```shell\n# Image classification\nfor beta in 0.01 0.02 0.04 0.08 0.16 0.32 0.64 1.28 2.56 \ndo\n  echo 'beta=${beta}'\n  pipenv run python image_classification.py -test_only --config configs/ilsvrc2012/entropic_student/bottleneck_resnet50-b24ch_igdn-beta${beta}_from_resnet50.yaml\ndone\n\n# Object detection\nfor beta in 0.04 0.08 0.16 0.32 0.64 1.28 2.56 \ndo\n  echo 'beta=${beta}'\n  pipenv run python object_detection.py -test_only --config configs/coco2017/shared_entropic_student/retinanet_bottleneck_resnet50-b24ch_igdn-beta${beta}_fpn_from_retinanet_resnet50_fpn.yaml\ndone\n\n# Semantic segmentation\nfor beta in 0.04 0.08 0.16 0.32 0.64 1.28 2.56 \ndo\n  echo 'beta=${beta}'\n  pipenv run python semantic_segmentation.py -test_only --config configs/coco2017/shared_entropic_student/deeplabv3_bottleneck_resnet50-b24ch_igdn-beta${beta}_from_deeplabv3_resnet50.yaml\ndone\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshitomo-matsubara%2Fsupervised-compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshitomo-matsubara%2Fsupervised-compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshitomo-matsubara%2Fsupervised-compression/lists"}