romulus0914 / CNN_VGG19_verilog

Convolution Neural Network of vgg19 model in verilog
43 stars 14 forks source link

CNN_VGG19_verilog

Convolutional Neural Network of VGG19 model in verilog

system architecture

cliffordwolf/picorv32 - CPU with RISC-V ISA

CNN architecture

VGG19 (imagenet-very-deep-vgg19.mat) - pretrained model by imagenet with 19 layers

Some useful tools

tools written by myself that will help a lot

vgg19.py

analyze imagenet-very-deep-vgg19.mat(need to download by yourself) and output to vgg19_weight/bias.txt

make vgg

image_converter.py

convert RGB value of .jpg(224 * 224) into .txt (in RGB order)

make image

softmax.py

convert output of the model, vgg19_output.txt, into problilities of 1000 classes corresponding to synset_word.txt and write to vgg19_probs.txt

make softmax

image folder

contain some .jpg files and its corresponding .txt and predict files

execution

make pcpi

p.s it's not actually a trainable model, just a reconstruction of vgg19 to input an image and get its prediction.