Git Product home page Git Product logo

3d-caffe's People

Contributors

faustomilletari 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

Watchers

 avatar  avatar  avatar  avatar  avatar

3d-caffe's Issues

make test and make runtest error

I am using ubuntu 14.04, cuda 8.0 cuDDN 5.0. Anaconda 2.1
$ sudo make all (successful)
$ sudo make pycaffe (successful)
import caffe (successful)
I met below error when I work work $ sudo make test OR $ sudo make runtest
I am newbie with deep learning. I am requested for your kind help please.


$ make runtest
CXX src/caffe/test/test_stochastic_pooling.cpp
src/caffe/test/test_stochastic_pooling.cpp: In member function ‘virtual void caffe::CPUStochasticPoolingLayerTest_TestSetup_Test<gtest_TypeParam_>::TestBody()’:
src/caffe/test/test_stochastic_pooling.cpp:59:35: error: no matching function for call to ‘caffe::PoolingParameter::set_kernel_size(int)’
pooling_param->set_kernel_size(3);
^
src/caffe/test/test_stochastic_pooling.cpp:59:35: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: void caffe::PoolingParameter::set_kernel_size(int, google::protobuf::uint32)
inline void PoolingParameter::set_kernel_size(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp:60:30: error: no matching function for call to ‘caffe::PoolingParameter::set_stride(int)’
pooling_param->set_stride(2);
^
src/caffe/test/test_stochastic_pooling.cpp:60:30: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: void caffe::PoolingParameter::set_stride(int, google::protobuf::uint32)
inline void PoolingParameter::set_stride(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp: In member function ‘virtual void caffe::GPUStochasticPoolingLayerTest_TestStochastic_Test<gtest_TypeParam_>::TestBody()’:
src/caffe/test/test_stochastic_pooling.cpp:82:35: error: no matching function for call to ‘caffe::PoolingParameter::set_kernel_size(int)’
pooling_param->set_kernel_size(3);
^
src/caffe/test/test_stochastic_pooling.cpp:82:35: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: void caffe::PoolingParameter::set_kernel_size(int, google::protobuf::uint32)
inline void PoolingParameter::set_kernel_size(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp:83:30: error: no matching function for call to ‘caffe::PoolingParameter::set_stride(int)’
pooling_param->set_stride(2);
^
src/caffe/test/test_stochastic_pooling.cpp:83:30: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: void caffe::PoolingParameter::set_stride(int, google::protobuf::uint32)
inline void PoolingParameter::set_stride(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp: In member function ‘virtual void caffe::GPUStochasticPoolingLayerTest_TestStochasticTestPhase_Test<gtest_TypeParam_>::TestBody()’:
src/caffe/test/test_stochastic_pooling.cpp:125:35: error: no matching function for call to ‘caffe::PoolingParameter::set_kernel_size(int)’
pooling_param->set_kernel_size(3);
^
src/caffe/test/test_stochastic_pooling.cpp:125:35: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: void caffe::PoolingParameter::set_kernel_size(int, google::protobuf::uint32)
inline void PoolingParameter::set_kernel_size(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp:126:30: error: no matching function for call to ‘caffe::PoolingParameter::set_stride(int)’
pooling_param->set_stride(2);
^
src/caffe/test/test_stochastic_pooling.cpp:126:30: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: void caffe::PoolingParameter::set_stride(int, google::protobuf::uint32)
inline void PoolingParameter::set_stride(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp: In member function ‘virtual void caffe::GPUStochasticPoolingLayerTest_TestGradient_Test<gtest_TypeParam_>::TestBody()’:
src/caffe/test/test_stochastic_pooling.cpp:162:35: error: no matching function for call to ‘caffe::PoolingParameter::set_kernel_size(int)’
pooling_param->set_kernel_size(3);
^
src/caffe/test/test_stochastic_pooling.cpp:162:35: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: void caffe::PoolingParameter::set_kernel_size(int, google::protobuf::uint32)
inline void PoolingParameter::set_kernel_size(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20194:13: note: candidate expects 2 arguments, 1 provided
src/caffe/test/test_stochastic_pooling.cpp:163:30: error: no matching function for call to ‘caffe::PoolingParameter::set_stride(int)’
pooling_param->set_stride(2);
^
src/caffe/test/test_stochastic_pooling.cpp:163:30: note: candidate is:
In file included from ./include/caffe/util/cudnn.hpp:9:0,
from ./include/caffe/util/device_alternate.hpp:40,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from src/caffe/test/test_stochastic_pooling.cpp:6:
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: void caffe::PoolingParameter::set_stride(int, google::protobuf::uint32)
inline void PoolingParameter::set_stride(int index, ::google::protobuf::uint32 value) {
^
.build_release/src/caffe/proto/caffe.pb.h:20219:13: note: candidate expects 2 arguments, 1 provided
make: *** [.build_release/src/caffe/test/test_stochastic_pooling.o] Error 1

What were the dependencies versions of the original V-net?

Hi @faustomilletari , thanks for sharing the codes for this great work. I compiled V-net and 3D-Caffe as instructed in your guide. When running "python main -train -test", errors prompt as
image I have been working on debugging for this issue, but kept failing.

Could you list the dependencies versions of your V-net and 3D-Caffe? (E.g. versions for CUDA, CUDNN, Caffe, Linux, Python.etc.

some error on compiling

Hello, faustomilletari

This is Jian Kang. I am very interested in your work 3D-caffe. So I tried to compile your 3D-Caffe, but I encountered a problem when I make runtest. it seems that something's wrong on softmax definition(dimension). Could you help me to fix it? The problem is as below. Thank you very much.

Best wishes,
Jian Kang

make -j all:
src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer::Forward_cpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&) [with Dtype = float]’:
src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here
src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable]
const Dtype* weight = bottom[2]->cpu_data();
src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer::Forward_cpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&) [with Dtype = double]’:
src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here
src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable]

make runtest:
22 tests from NetTest/0, where TypeParam = caffe::CPUDevice
[ RUN ] NetTest/0.TestGetLayerByName
F0912 05:07:01.832667 3518 layer.hpp:343] Check failed: ExactNumBottomBlobs() == bottom.size() (3 vs. 2) SoftmaxWithLoss Layer takes 3 bottom blob(s) as input.
*** Check failure stack trace: ***
@ 0x2aca2464ddaa (unknown)
@ 0x2aca2464dce4 (unknown)
@ 0x2aca2464d6e6 (unknown)
@ 0x2aca24650687 (unknown)
@ 0x461059 caffe::Layer<>::CheckBlobCounts()
@ 0x2aca25f71fd4 caffe::Net<>::Init()
@ 0x2aca25f73d62 caffe::Net<>::Net()
@ 0x575099 caffe::NetTest<>::InitNetFromProtoString()
@ 0x5328bc caffe::NetTest<>::InitTinyNet()
@ 0x56f4ba caffe::NetTest_TestGetLayerByName_Test<>::TestBody()
@ 0x890b23 testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x887767 testing::Test::Run()
@ 0x88780e testing::TestInfo::Run()
@ 0x887915 testing::TestCase::Run()
@ 0x88ac58 testing::internal::UnitTestImpl::RunAllTests()
@ 0x88aee7 testing::UnitTest::Run()
@ 0x4514fa main
@ 0x2aca26e0af45 (unknown)
@ 0x457b59 (unknown)
@ (nil) (unknown)
make: *** [runtest] Aborted (core dumped)

What is different between 3D-Caffe and current BVLC caffe?

Hello author, this is very nice work. I just want to ask you some question about your work

  1. Your 3D-caffe can work in the voxel level, instead of the pixel. Hence, all operations must be worked in 3D matrix input, instead of 2D matrix. However, I think that a 3D matrix can created by concatenation of 2D matrices. The BVLC caffe also support convolutionND, poolingND (link1, link2), where N is 3 in your case. So, what is different between your 3D-caffe and current BVLC caffe?
    I refer this question because I installed many caffe versions in my computer. Is it possible to use current caffe instead of your caffe?
  2. You are using DICE as loss function to maximize. It is very good idea but it may be only work in 2 classes. Do you think about more two classes case, such as brain segmentation which has at least 4 classes? Because I want to apply V-Net for brain segmentation which is more complex

Best Regards,
John

Problems compiling 3D-Caffe on Fedora24

Dear Fausto,
thanks for your great work on 3D-Caffe! We were able to compile and run the standard Caffe.rc3 on Fedora 24 system. However, when we try to compile 3D caffe we stop with the following error:

`Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_absval_layer.cu.o
Generating /home/jtorrents/CUDA/3D_Caffe/build-cmake/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_absval_layer.cu.o
/usr/local/cuda-8.0/bin/nvcc /home/jtorrents/CUDA/3D_Caffe/src/caffe/layers/absval_layer.cu -c -o /home/jtorrents/CUDA/3D_Caffe/build-cmake/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_absval_layer.cu.o -ccbin /usr/lib64/ccache/cc -m64 -DUSE_CUDNN -DWITH_PYTHON_LAYER -DGTEST_USE_OWN_TR1_TUPLE -Xcompiler ,\"-std=c++98\",\"-fPIC\",\"-Wall\",\"-Wno-sign-compare\",\"-Wno-uninitialized\",\"-O2\",\"-DNDEBUG\" -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -Xcudafe --diag_suppress=cc_clobber_ignored -Xcudafe --diag_suppress=integer_sign_change -Xcudafe --diag_suppress=useless_using_declaration -Xcudafe --diag_suppress=set_but_not_used -Xcompiler -fPIC -DNVCC -I/usr/local/cuda-8.0/include -I/home/jtorrents/CUDA/3D_Caffe/src -I/usr/include -I/home/jtorrents/CUDA/3D_Caffe/build-cmake/include -I/usr/local/cuda-8.0/include -I/home/jtorrents/CUDA/CuDNN_v3/include -I/usr/include/opencv -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/jtorrents/CUDA/3D_Caffe/include -I/home/jtorrents/CUDA/3D_Caffe/build-cmake
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(141): error: too many arguments in function call
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(160): error: identifier "CUDNN_NOT_PROPAGATE_NAN" is undefined
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(160): error: too many arguments in function call
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(179): error: identifier "CUDNN_NOT_PROPAGATE_NAN" is undefined
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(179): error: argument of type "int" is incompatible with parameter of type "const int *"
/home/jtorrents/CUDA/3D_Caffe/include/caffe/util/cudnn.hpp(179): error: too many arguments in function call
6 errors detected in the compilation of "/tmp/tmpxft_000074ab_00000000-5_absval_layer.cpp4.ii"`

The configuration is as follows:
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   <TODO> (Caffe doesn't declare its version in headers)
--   Git               :   unknown
--   System            :   Linux
--   C++ compiler      :   /usr/lib64/ccache/c++
--   Release CXX flags :   -O2 -DNDEBUG -std=c++98 -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags   :   -g -std=c++98 -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Build type        :   Release
-- 
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   ON
--   BUILD_matlab      :   OFF
--   BUILD_docs        :   ON
--   CPU_ONLY          :   OFF
-- 
-- Dependencies:
--   BLAS              :   Yes (Open)
--   Boost             :   Yes (ver. 1.60)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.6.1)
--   lmdb              :   Yes (ver. 0.9.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   LevelDB           :   Yes (ver. 1.12)
--   OpenCV            :   Yes (ver. 2.4.12.2)
--   CUDA              :   Yes (ver. 8.0)
-- 
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_20 sm_21 sm_30 sm_35 sm_50
--   cuDNN             :   Yes (v3)
-- 
-- Python:
--   Interpreter       :   /usr/bin/python2.7 (ver. 2.7.12)
--   Libraries         :   /usr/lib64/libpython2.7.so (ver 2.7.12)
--   NumPy             :   /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.11.0)
-- 
-- Documentaion:
--   Doxygen           :   No
--   config_file       :   
-- 
-- Install:
--   Install path      :   /home/jtorrents/CUDA/3D_Caffe/build-cmake/install
-- 
-- Configuring done

Thanks and regards!
Jordina

HDF5 different input size

Hi Fausto,

I am training the VNet on this useful 3D Caffe with HDf5 file as input.
If my input 3D data is the same size for each training sample, e.g., N * 1 * H * W * D for both data and label, where N is the batch size and H W D is the dimension of all the 3D data, this case is fine and I can train the VNet without any problems.

However, if I want to have the input with different size, let's say, the N always equals 1 and H W D are dynamic for each case, then it comes with issues for training.
First, I checked the data HDF5 data, which has different size for different samples. Then, let's say the first training sample is 1 * 1 * H_0 * W_0 * D_0. The problem is that all the later input will be reshaped to the same size as the first training sample: 1 * 1 * H_0 * W_0 * D_0. Therefore, the loaded data for the second sample (and after) will give NaN since it may read the data out of bound.

Could you have possible solutions for this problem?

Thank you!
Zhuotun

when I make runtest ,I met a problem.

*** Aborted at 1493102958 (unix time) try "date -d @1493102958" if you are using GNU date ***
PC: @ 0x7f3e0d9ebdc5 caffe::Blob<>::gpu_data()
*** SIGSEGV (@0x20) received by PID 8972 (TID 0x7f3e15c27740) from PID 32; stack trace: ***
@ 0x7f3e0d188390 (unknown)
@ 0x7f3e0d9ebdc5 caffe::Blob<>::gpu_data()
@ 0x7f3e0db21afb caffe::SoftmaxWithLossLayer<>::Forward_gpu()
@ 0x7f3e0da4b179 caffe::Net<>::ForwardFromTo()
@ 0x7f3e0da4b5a7 caffe::Net<>::ForwardPrefilled()
@ 0x4fa5a1 caffe::NetTest_TestBackwardWithAccuracyLayer_Test<>::TestBody()
@ 0x892493 testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x8890d7 testing::Test::Run()
@ 0x88917e testing::TestInfo::Run()
@ 0x889285 testing::TestCase::Run()
@ 0x88c5c8 testing::internal::UnitTestImpl::RunAllTests()
@ 0x88c857 testing::UnitTest::Run()
@ 0x4520ca main
@ 0x7f3e0cdce830 (unknown)
@ 0x458729 _start
Makefile:526: recipe for target 'runtest' failed

is 3D caffe available for windows ?

Hello, faustomilletari
Thank you for sharing your 3D caffe. is there any windows version available ?
if not, what files did you revise from original caffe ?
do you have any suggestion how to update windows caffe to support 3D caffe ? I might be able to work on it.
Regards
Ehsan

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.