GithubHelp home page GithubHelp logo

niuzhiheng / caffe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bvlc/caffe

317.0 317.0 129.0 27.82 MB

Caffe

Home Page: http://caffe.berkeleyvision.org/

License: BSD 2-Clause "Simplified" License

Shell 0.45% C++ 84.47% C 0.01% MATLAB 0.47% Python 10.17% Cuda 3.49% Protocol Buffer 0.93%

caffe's People

Contributors

aloa avatar beam2d avatar blackball avatar chyojn avatar erictzeng avatar forresti avatar jamt9000 avatar jeffdonahue avatar jetpaccomputer avatar kloudkl avatar longjon avatar mavenlin avatar mjmarin avatar niuzhiheng avatar rbgirshick avatar rodrigob avatar sergeyk avatar sguada avatar shelhamer avatar t-abe avatar tdomhan avatar viirya avatar yangqing avatar yosinski avatar zxyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caffe's Issues

GPU drivers

Hi zhiheng,

I find that the latest GPU driver for GTX Titan is 340.52 WHQL. Which GPU series is the version 340.62 for ?

Thanks

extract_features.cpp compile fixes

3 Things:

  • snprintf => _snprintf
  • typedef unsigned int uint; at the top
  • shared_ptr to boost::shared_ptr

Maybe I should check out how to do pull requests ...

Running Speed for Windows Caffe

Hello,
I tested on the CIFAR10 dataset with your version of Windows Caffe, and it turns out that the full solver(60000 iterations) took several hours to complete(more than 6 hours), much slower than I had expected.
I would like to know whether it is a hardware issue, so could you please tell me how long this training took on your machine? Thanks!

how I transfer my data to format of caffe needed in windows?

I have wrote all the training files' names and labels in a text named train.txt, as following format:
F:\cnn training\Sample001\img001-00001.jpg 1
F:\cnn training\Sample001\img001-00002.jpg 1
F:\cnn training\Sample002\img001-00003.jpg 2
F:\cnn training\Sample001\img001-00004.jpg 2
there are 62 classes. I also got convert_imageset.exe by mainCaller.
Then I start command line windows and enter following command:
convert_imageset f:\caffe-windows\mydata\train.txt f:\caffe-windows\to\train_leveldb
but it seemed that no files are produced, there only have following prompt:
convert_imageset ROOTFOLDER/LISTFILE DB_NAME RANDOM_SHUFFAL_DATA[0 or 1]

what' s wrong? Could anybody give me some suggetion? Thank you!

how to run imagenet example in windows

hi, thanks your help, I have successfully run mnist in my computer. I am a newbie and do not know how to do next. My ultimate goal is to train my own model using caffe, I do not know how to prepare the training data of the type of caffe needed. can i try other examples in windows, e.g. imagenet? could you give me some suggestion on how to get familiar with caffe? Really thanks a lot!

error MSB3073: 命令“set origin_dir=Í%

When I compiling the project, VS return the error message:
Why? and what I can do? Thank you!

错误 1 error MSB3073: 命令“set origin_dir=Í%
cd ../../
"./scripts/GeneratePB.bat"
cd %origin_dir%
:VCEnd”已退出,代码为 1。 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 122 5 MainCaller

Would you please update to the latest caffe for windows?

This is great work, you have done.
But I found there are missing some .cpp files (such as accuracy_layer.cpp, argmax_layer.cpp...).

Would you please build the latest caffe version for windows?

Or would you please tell me how to rebulid this project?

best wishes,
Jun Wan

I have a build error

When I build the project, this error happened.
error C2084: function 'int main(int argc, char** argv)' already has a body.
How can I solve this problem?

when i compling the dump_netwok.cpp has a error

when i compling the dump_netwok.cpp has a error.
0x000007FEF076AA60 (msvcr110d.dll) (MainCaller.exe 中)处有未经处理的异常: 0xC0000005: 读取位置 0x0000000000000000 时发生访问冲突。

Problem Building on Windows 8.1 x64

Hi,
I Followed the installations instructions and when I Build the Project, after few minutes VS 2012 give the following error:

1> ptxas C:/Users/ANDR~1/AppData/Local/Temp/tmpxft_00002c90_00000000-13_bnll_layer.compute_20.ptx, line 1709; fatal : Parsing error near '-': syntax error
1> ptxas fatal : Ptx assembly aborted due to errors
1> bnll_layer.cu
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 6.5.targets(593,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\bin\nvcc.exe" -gencode=arch=compute_20,code="sm_20,compute_20" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_35,code="sm_35,compute_35" -gencode=arch=compute_50,code="sm_50,compute_50" --use-local-env --cl-version 2012 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64" -I../../3rdparty/include -I../../3rdparty/include/eigen3/Eigen -I../../src -I../../include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -D_VARIADIC_MAX=10 -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o Debug\bnll_layer.cu.obj "C:\Users\André\Downloads\caffe-windows\caffe-windows\src\caffe\layers\bnll_layer.cu"" exited with code 255.

I'm Using a Windows 8.1, 64 bits, Visual Studio 2012, CUDA Framework v6.5, and I Buil the Project using the x64 architecture

Anyone ever had this error?

Thanks,
André

new net in matcaffe failed

Hi, have you compiled the matcaffe code in windows? I found I can not new net with prototxt file when init the net in matcaffe. And I can not understand why.

Build error in MainBuilder.vcxproj Fatal error C1083

I am facing build error in win64 with following message.

e:\caffe\caffe-windows\src\caffe\util\upgrade_proto.cpp(10): fatal error C1083: Cannot open include file: 'caffe/common.hpp':
No such file or directory [E:affe\caffe-windows\build\MSVC\MainBuilder.vcxproj]

Can you please help me in resolving this issue?
Thanks in advance.

-Deva Reddy

Issues of assertion for computing images means

when I use compute_images_mean to compute mean of images, It throw an assertion as following:

Assertion failed: dummy_versions_.next==&dummy_versions_. file .db\version_set.cc, line 803

Dose anybody give me some suggestion on it or anybody help me compute my dataset's mean?

Unresolved external symbols

Hey,

I'm trying to compile the library on Windows 7 64 bit on Visual Studio 2012. Cuda toolkit 6.5 is in place with all the dependencies.

Now initially I was getting this error: "C2977: 'std::tuple' : too many template arguments"

which i resolved by setting "_VARIADIC_MAX=10;" in the preprocessor instructions as this is apparently a bug linked to a change in VS2012.

Now everything is compiling fine but I am getting unresolved external symbols for all calls related to:

Forward_gpu() && Backward_gpu()

I can see its a virtual function but I can't seem to find its implementation in the code either.

Any help would be appreciated.

How to adjust the parameters correctly ?

I'm not sure if this can be answered easily. I created two small level-dbs containing different images of bananas and keyboards. Both contain 10 images, 256^2 pixels in size. I calculated the mean of them and modified imagenet__.prototxt to refernce those files. I did the same with the lenet__.prototxt files. When I run train_net on those, it absically seem to work, but super slow. The mnist dataset finishes in about 30 minutes, but the same prototxt files referencing my dbs take 1.2 h to display only the first test score:

I0621 12:19:46.140650 1944 solver.cpp:106] Iteration 0, Testing net
I0621 13:30:20.244161 1944 solver.cpp:142] Test score #0: 0
I0621 13:30:20.245159 1944 solver.cpp:142] Test score #1: 2.30191

Using the imagenet-prototxt files, nothing happens for the first 1.5 h.

Am I doing something completely wrong? This code was used to train imagenet images, so my 20 images alone can't make it so slow?

CUDA driver is insufficient

I'm trying to run the net_speed_benchmark on my GPU. After building the solution, when I try to run it, I get the following error:
"Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version"
I installed the 6.5 toolkit. Is there something I'm missing? Certain libs that I should copy anywhere. etc.?
Thanks in advance!

Log Severity INFO to stdout

Hi !

This is probably a Google Log Question but my google skills failed me on this one so I just ask it here: How do I enable logging of the INFO messages to stdout so I can see them in the cmd box? So far, I was able to do

::google::SetLogDestination(0, ".");

which creates a log file in the working directory that logs everything. I tried tail on it, but the files doesn't seem to get flushed regularly, so updates in tail are rather infrequent.

The prebuild standalone exes have this, so I was wondering how I could enable this in my own builds.

Thx a lot!
marc

Converting Opencv Matrix to Caffe data format?

As I searched from the original caffe repo. people developed a way to do it but it is removed from the main branch for some reason. I see that in this version of caffee there are opencv bindings and I suspect that there can be a way of reading opencv images into caffe format for any prediction. Is there any way to do it?

where is dynamic link library of caffe?

I want to use caffe function in my own project, but I do not find any dynamic link library
of caffe for windows. where can I find it or how I produce it ? Dose any body can tell
me about it? thank you!

train_net says "The handle is invalid"

Hi !

I'm not sure why I get this message, so I describe what I did.

I'm trying to use caffe on a test dataset I created. It contains of Images containing two types of things. I scalled all Images to 256^2 jpgs.

I put all Images in a Directory. I created a text files containing the filesnames of the Images followed by a 0 or a 1, depending on the class I want them in. Is this the correct?

I execute conver_imageset on that directory with Shuffle set to 1. It creates a leveldb-Directory.

Afterwards, I execute compute_image_mean of the leveldb. I'm not sure if this is needed. I see the imagenet_.prototxt reference this while the lenet_.prototxt don't reference an Image_mean file.

I copied the imagenet_solver.prototxt, imagenet_train.prototxt and imagenet_val.prototxt and changed the references to the leveldb and the imagemean-file. Afterwards, when I call Train_net with the imagenet_train.prototxt, I get the error message

F0620 02:05:50.904736 11536 data_layer.cpp:148] Check failed: status.ok() Failed
to open leveldb testpicsdb
IO error: testpicsdb\MANIFEST-000013: The handle is invalid.
*** Check failure stack trace: ***

Also, I tried modifying the lenet_prototxt-files accoringly and tried using them with train_net. The result is the same. But, if I call Train_net on the unmodified lenet_prototxt files referencing the mnist-leveldb, it works. So I assume somehow it's my leveldb. But what's wrong with it?

For completeness, I uploaded the testimages as well as the list-file, generated leveldb, imagemean, *.prototxt if you want to take a look,.
here http://www.transmogrifier.de/temp/testpics.7z .

Thx
marc

Missing libgfortran-3.dll

After compilation I now get a "The program can't start because libgfortran-3.dll is missing from your Computer"-message when I try to run train_net.exe . Strangely, compute_image_mean and conver_imageset work.
I did a fresh git clone on another pc. I also used newer precompiled dependencies. Before I used dependency-20140514.7z, now I'm using dependency-20140624.7z.
The old one used libgslcblas-0.dll, the new libopenblas.dll . so maybe something is odd there?

Error: invalid device function

I got this error, was able to solve it so like to share with others.

Compiling VS was successful, but when running the .exe (in mnist/train_lenet.bat)
I got the runtime error.
Laptop is nvidia 765m, install CUDA 6.0
(note, install VS2012 before installing CUDA)

after reading this link:
BVLC#138

I go to Solution Explorer, right click on the project, Properties.

Configuration Proporties->CUDA C/C++->Device
on the line Code Generation, put:

compute_20,sm_20;compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_50,compute_50
(note no space)

then I can compile in VS and run exe without problem.

Hopefully this will help others who have trouble.

mnist train_lenet.bat error

When I finished compiling and downloading the mnist dataset, I double clicked train_lenet.bat, then an error happened:
"../../bin/tra
in_net.exe" lenet_solver.prototxt
E1220 21:53:59.918418 28276 upgrade_net_proto_binary.cpp:22] Usage: upgrade_net_
proto_binary v0_net_proto_file_in net_proto_file_out

Anyone has any solutions? Thanks.

The mean image of the ILSVRC dataset is corrupted?

I've run the get_ilsvrc_aux.sh and downloaded gzip file "caffe_ilsvrc12.tar.gz" from your dropbox, but the problem is, I failed to unzip this file and the error message is :
gzip: stdin: not in gzip format
tar: child returned status 1
tar: Error is not revoverble: exiting now
Where can I get the file imagenet_mean.binaryproto?
Thanks.

errors on trying train_lenet.bat

Hi, I have successful built the files and generate MainCaller.exe. Then I try train_lenet.bat, it works fine in the cpu mode, however in gpu mode, it fails and the following error comes out?
Could you help me? Thx.
I0624 17:19:24.384238 2980 data_layer.cpp:145] Opening leveldb mnist-train-leve
ldb
F0624 17:19:24.394739 2980 data_layer.cpp:148] Check failed: status.ok() Failed
to open leveldb mnist-train-leveldb
IO error: mnist-train-leveldb\MANIFEST-000184: The handle is invalid.
*** Check failure stack trace: ***

image_data_layer problem on windows

I have successfully run the mnist example on my pc windows. But, when I using feature_extraction, I can not read prototxt. I catch the failure appeared when the data is image_data_layer, using leveldb is ok.
Do you have met this problem? Or can you give me any suggestion?

Thanks very much.

Error: invalid device function

I have some errors like this when running the train_lenet.bat with GPU. How to handle those problems?
... im2col.cu:49] Check failed. Error == cudaSuccess (8 vs.0) invalid device function

My GPU is GTX650.
I can run both the NVIDIA-bundled samples and train_lenet.bat with CPU successfully.

MATLAB wrapper for Windows

Hi,

I wanted to ask that what modifications I must perform on the matcaffe.cpp so it can work for the windows installation you have proposed.

why do I have the problem about '"./tools/protoc"'?Thank you for answering me.

'"./tools/protoc"' 不是内部或外部命令,也不是可运行的程序
1> 或批处理文件。
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: 命令“set origin_dir=Í%
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: cd ../../
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: "./scripts/GeneratePB.bat"
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: cd %origin_dir%
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: :VCEnd”已退出,代码为 1。
1>
1>failure

Accuracy differences between Niuzhiheng-Caffe and BLVC-Caffe?

Has anyone done a comparison test that shows the Niuzhiheng-Caffe and BLVC-Caffe versions produce the same accuracy on a comprehensive task, say the ImageNet classification task?

It would be great to have some evidence that the porting to Windows did not introduce any accuracy issues. (I am asking this question because I did experience Windows ports of other neural network projects having accuracy differences.)

how can i train ImageNet on windows?

first, I can't find the convert_imageset.bin, and on the windows i can't run the *.sh script files.
so I 've used the convert_imageset.cpp build up the convert_imageset.exe, and the I create a batch file so that can run on windows. it looks like this:

echo "Creating leveldb..."

SET GLOG_logtostderr=1 
    "..//..//bin//convert_imageset.exe"  ".//LUJIN//to//imagenet//train//"  "..//..//data//ilsvrc12//train.txt"     "imagenet_train_leveldb"    0
echo "Done."
pause

the content of train.txt is:
n01443537/n01443537_2.JPEG 1
n01443537/n01443537_129.JPEG 1
and the correspond picture in the folder "./LUJIN/to/imagenet/train/"
when there only one picture in the folder, it's ok! but more than one picture it will be error happend,
the error in the convert_imageset.cpp line 88 is:
CHECK_EQ(data.size(), data_size) << "Incorrect data field size "
that is data.size not equal to data_size,

I guess the reason is that all the picture is not the same size, but how can i crop the picture size to the fixed size? and what size will be the best size?
thanks for your help!

Adding a layer - updating caffe.proto

Hi,

I'm trying to add a layer. In linux, I would change caffe.proto, and then caffe.pb.h and the other effected files would have been updated automatically.

I tried doing the same here (changing caffe.proto - adding a new layer), but caffe.pb.h does not update and therefore I can't use my new layer.

Did I miss something? Could anyone explain how caffe.proto is being converted on windows?

Thanks!

Merging the latest version from caffe master

Hi,

I have downloaded your version of caffe for Windows and it seems to work fine. Thanks.

It seems that the master version progresses, so there may be a need to merge with its latest version from time to time.
Are you planning to maintain the code up to date ?
If I want to merge it myself, then, except for copying the changed .cpp .cc .h .hpp files, is there something else I should do ?

Thanks,
Shaile.

Build problem with VS2012

I am new to caffe and programming in general. When building I get following Error:

untitled

what am I doing wrong ?

how I load a modal for my own data?

Dear all:
If I have trained a cnn model, how I load it in my program to use it
for classifiying? Dose any function or class support loading a modal
and make a prediction? Thank you!

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.