Cnn infer framework implemented in pure numpy

Hi, everyone

I wrote a pure numpy based cnn infer framework. Which is very esay to install.
numpy-cnn, It would be embedded in ImagePy soon.

It is also a good choice for some simple ml work without gpu. And we had release some demo:

Features

  • Extremely streamlined Intermediate Representation (IR).
  • Pure numpy implementations, which is easy to deploy.
  • Ravel numpy weights storage, which largely simplifies the loading process.
  • Optimized codes, which achieve ~30% speed up compared to PyTorch 1.1.0 cpu.

Visualization

Using show() to plot the structure of net (networkx and matplotlib needed)

net.show()

demo.py includes the plot. The result of UNET and HED are shown as flowing:

HED

Demos of numpy-cnn

Here we release some supported demos.

CRAFT text detector

Demo for scene text detector with model CRAFT.
Run python main.py inside folder craft_text_detector. 2 files (same level folder with main.py) are needed (craft.txt, craft.npy)
The detected result is shown as following:

HED edge detector

Demo for edge detector with model HED. Run python main.py inside folder hed_edge_detector. 2 files (same level folder with main.py) are needed (hed.txt, hed.npy)
The detected result is shown as following:

Resnet18 trained on ImageNet

Demo for image classification with resnet18. python main.py inside folder resnet18. 2 files (same level folder with main.py) are needed (res.txt, res.npy)
The detected result is shown as following:

Mobilenet-v1 trained on ImageNet

Demo for image classification with mobilenet-v1. python main.py inside folder mobilenet-v1. 2 files (same level folder with main.py) are needed (mobile.txt, mobile.npy)
The detected result is shown as following:

Unet Segment

Demo for Unet Segmetn trained with data here. 1. python main.py inside folder unet-segment. 2 files (same level folder with main.py) are needed (unet.txt, unet.npy)
The detected result is shown as following:

1 Like