mmdetection-prune

pruning for OpenMMLab Detection Toolbox

https://github.com/itsmorteza/mmdetection-prune

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

pruning for OpenMMLab Detection Toolbox

Basic Info
  • Host: GitHub
  • Owner: itsMorteza
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 4.44 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

mmdetection-prune

This is the code for pruning the mmdetection model with filter pruning and channel pruning.

Get Started

1. Creat a basic environment with pytorch 1.3.0 and mmcv-full

Due to the frequent changes of the autograd interface, we only guarantee the code works well in pytorch==1.3.0.

  1. Creat the environment shell conda create -n open-mmlab python=3.7 -y conda activate open-mmlab
  2. Install PyTorch 1.3.0 and corresponding torchvision. shell conda install pytorch=1.3.0 cudatoolkit=10.0 torchvision=0.2.2 -c pytorch
  3. Build the mmcv-full from source with pytorch 1.3.0 and cuda 10.0 : mmcv-version 1.3.16 #### Please use gcc-5.4 and nvcc 10.0 shell git clone https://github.com/open-mmlab/mmcv.git cd mmcv MMCV_WITH_OPS=1 pip install -e .

2. Install the corresponding codebase in OpenMMLab.

e.g. MMdetection

shell pip install mmdet==2.18.0

3. Pruning the model and Fine tuning.

e.g. Detection

Modify the load_from as the path to the baseline model in of xxxx_pruning.py

```shell

for slurm train

sh tools/slurmtrain.sh PATITIONNAME JOBNAME configs/retina/retinapruning.py work_dir

for slurm_test

sh tools/slurmtest.sh PATITIONNAME JOBNAME configs/retina/retinapruning.py PATH_CKPT --eval bbox

for torch.dist

sh tools/disttrain.sh configs/retina/retinapruning.py 8

``` Built on top of these amazing libraries: MMdetection MMCV torch-pruning FisherPruning

Owner

  • Name: Morteza Pasandi
  • Login: itsMorteza
  • Kind: user
  • Location: Ottawa
  • Company: uOttawa

Research Assistant at uOttawa.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - name: "MMDetection Contributors"
title: "OpenMMLab Detection Toolbox and Benchmark"
date-released: 2018-08-22
url: "https://github.com/open-mmlab/mmdetection"
license: Apache-2.0

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

docker/Dockerfile docker
  • pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
docker/serve/Dockerfile docker
  • pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
requirements/build.txt pypi
  • cython *
  • numpy *
requirements/docs.txt pypi
  • docutils ==0.16.0
  • recommonmark *
  • sphinx ==4.0.2
  • sphinx-copybutton *
  • sphinx_markdown_tables *
  • sphinx_rtd_theme ==0.5.2
requirements/mminstall.txt pypi
  • mmcv-full >=1.3.8
requirements/optional.txt pypi
  • cityscapesscripts *
  • imagecorruptions *
  • scipy *
  • sklearn *
requirements/readthedocs.txt pypi
  • mmcv *
  • torch *
  • torchvision *
requirements/runtime.txt pypi
  • matplotlib *
  • numpy *
  • pycocotools *
  • pycocotools-windows *
  • six *
  • terminaltables *
requirements/tests.txt pypi
  • asynctest * test
  • codecov * test
  • flake8 * test
  • interrogate * test
  • isort ==4.3.21 test
  • kwarray * test
  • mmtrack * test
  • onnx ==1.7.0 test
  • onnxruntime >=1.8.0 test
  • pytest * test
  • ubelt * test
  • xdoctest >=0.10.0 test
  • yapf * test
requirements.txt pypi
setup.py pypi