Giter Site home page Giter Site logo

dcci's Introduction

DCCI

Content-Aware Adaptive Device-Cloud Collaborative Inference for Object Detection

Dependencies

There are some dependencies for running this

  1. python3
  2. pytorch
  3. torchvision
  4. zeromq
  5. fvcore

How to compress large models

  1. Load initialization weights for basic training
python train.py --cfg cfg/yolov4.cfg --data data/voc.data --weights weights/yolov4.weights --epochs 100 --batch-size 16
  1. Based on the optimal weights trained in step 1, perform sparse training
python train.py --cfg cfg/yolov4.cfg --data data/voc.data --weights weights/best.pt --epochs 299 --batch-size 64 -sr --s 0.0001 --prune 1
  1. Channel-level pruning using sparsely trained models
python channel_pruning.py --cfg cfg/yolov4.cfg --data data/voc.data --weights weights/best.pt --global_percent 0.9 --layer_keep 0.01
  1. Layer-level pruning using channel-pruned models
python layer_prune.py --cfg cfg/light_weight_channel.cfg --data data/voc.data --weights weights/light_weight_channel.weight --rl_epochs 80 --batch-size 32
  1. Fine-tune recovery accuracy
python train.py --cfg cfg/light_weight_layer.cfg --data data/voc.data --weights weights/light_weight_layer.weights --epochs 100 --batch-size 32

Run end-to-end

We give an example of an end-to-end test under examples. The end_to_end_test file is used to test the end-to-end accuracy. The partition_datasets file is used to partition datasets into hard and simple cases. detect_client is deployed to IoT devices and detect_server is deployed to the cloud.

The weight model can be obtained here

link:https://pan.baidu.com/s/19gVlej3ZkRVxn-n6uVMpPQ

password:lar5

dcci's People

Contributors

edgeai1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.