File Exchange

image thumbnail


version (1.99 MB) by Andrea Vedaldi
MatConvNet: CNNs for MATLAB


Updated 21 Jun 2018

From GitHub

View Version History

View license on GitHub

Please refer to the homepage ( for releases, data, and documentation.
MatConvNet is a MATLAB toolbox implementing Convolutional Neural Networks (CNNs) for computer vision applications. It is simple, efficient (integrating MATLAB GPU support), and can run and learn state-of-the-art CNNs, similar to the ones achieving top scores in the ImageNet challenge. Several example CNNs are included to classify and encode images.
An important feature of MatConvNet is making available the CNN building blocks as easy-to-use MATLAB commands. This allows prototyping new CNN architectures and learning algorithms as well as recycling fast convolution code for sliding window object detection and other applications.

MatConvNet is developed by a team of computer vision scientists in Oxford and other research institutions.

Cite As

Andrea Vedaldi (2021). vlfeat/matconvnet (, GitHub. Retrieved .

Comments and Ratings (25)

jianfeng pei

I want to use the DnCNN to finish the image restruction ,but why my supervistor let me download this net?Is it has anything to do with the DnCNN?Has got anyone explain the connection between them?

Yi wang


Peter Yen

abc abc

Jiahui Hao

rd junze

yin chao

I am considering using matlab to do research. There is two choice now, one is MaConvNet, the other is the Toolbox within Matlab 2017b. Any one could share some experience about those two?

Hossein kashani

Yaren Zhang

I thought it's a simple and powerful tool


Hi.. I am trying to compile it in windows, but some problem is showing with 'mex' compiler. Please give me some solution. And Can I compile the programs without GPU ?

Ligong Han

Javier Coronel

Nicola Franzoso


HI, how can i train my own dataset and where i need to collect last layer feature values.


is this can be done in matlab2013b?

jialin lu

Hi,I have successfully compiled for CPU by using the MATLAB function vl_compilenn In windows 8.1,MATLAB 2014b.To use the the GPU-accelerated version of the library,I try to Compile the GPU support, the version of CUDA toolkit is 6.0, I got the following error message:
错误使用 mex
LINK : fatal error LNK1181: 无法打开输入文件“E:\matlab
Could you explain it and tell me some solutions ,tks you !!!

Nicola Franzoso

Dear Andrea, how can train my net using my images ?
Thank you in advance.

Peng Zhang


I compiled for CPU support. The compilation completed successfully. However, when I tried running vl_test_nnlayers, I got the following message:
testing vl_nnsoftamxloss multiple images convolutional
To use 'gather', you might need:
gather - Parallel Computing Toolbox

Error in vl_testsim (line 16)
a = gather(a) ;

Error in vl_test_nnlayers (line 67)
vl_testsim(y,y_,0.1) ;

I thought the parallel toolbox is not required in CPU mode. I don't have this toolbox. Please advise.

asd zxc

Shashank Prasanna

Thai V. Hoang

Karel: it works for me now with Matlab R2014b. Previously, cannot compile with CUDA using R2013b in both Ubuntu 12.04 and 14.04.

Karel Lenc

Thai V. Hoang: Can you maybe give some more details, e.g. of your operating system? Also, I think that filling an issue on the github (link in upper right corner, cool feature of new fex :)) may be a more effective way how to solve it, but it will probably be incorrect mex configuration...

Thai V. Hoang

I have the following error when running vl_compilenn('enableGpu', true)

gcc-4.4: No such file or directory

mex: compile of ' "./matconvnet-1.0-beta8/matlab/src/bits/"' failed

Could you please help me out? Thanks


MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!