Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wolegechu/ShuffleNetV2.Caffe2
A Caffe2 implementation of ShuffleNet V2.
https://github.com/wolegechu/ShuffleNetV2.Caffe2
Last synced: 8 days ago
JSON representation
A Caffe2 implementation of ShuffleNet V2.
- Host: GitHub
- URL: https://github.com/wolegechu/ShuffleNetV2.Caffe2
- Owner: wolegechu
- Created: 2018-07-29T17:44:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T22:36:11.000Z (over 6 years ago)
- Last Synced: 2024-08-01T22:50:07.617Z (3 months ago)
- Language: Python
- Homepage:
- Size: 251 KB
- Stars: 25
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-image-classification - unofficial-caff2: https://github.com/wolegechu/ShuffleNetV2.Caffe2
- awesome-image-classification - unofficial-caff2: https://github.com/wolegechu/ShuffleNetV2.Caffe2
README
# ShuffleNetV2.Caffe2
## How to Use
![](Table_1.png)```python
from caffe2.python import cnn
from shufflenetv2 import add_ShuffleNet_V2cnn_model = cnn.CNNModelHelper()
add_ShuffleNet_V2(cnn_model, output_channels=[24, 48, 96, 192, 1024],
stride_1_repeat_times=[3, 7, 3],
stride_2_repeat_times=[1, 1, 1], # Set according to the Table
testing=False, # For training
detection=False) # Build net as backbone of a two-stage detection model
workspace.RunNetOnce(cnn_model.param_init_net)workspace.FeedBlob("data", np.random.randn(8, 3, 224, 224).astype(np.float32))
workspace.RunNetOnce(cnn_model.Proto())print(workspace.FetchBlob('conv_5'))
```
### Use ShuffleNet on Detectron
If you want tu use ShuffleNetV2 as a backbone of a detection framework (egg., Faster R-CNN, FPN), simply download [this file](https://github.com/wolegechu/Detectron/blob/master/detectron/modeling/ShuffleNetV2.py) to `detectron\modeling\ShuffleNetV2.py`, and set the parameter `CONV_BODY: ShuffleNetV2.add_ShuffleNet_V2` in the yaml file.