caffe runtest failure and opencv in python layer doesnt work

202 views
Skip to first unread message

Liyuan Qin

unread,
Nov 7, 2017, 1:59:53 PM11/7/17
to Caffe Users

I was trying to reproduce some project in https://github.com/vkalogeiton/caffe/tree/act-detector

its okay to run: sudo make all 
sudo make test also fine
But when I run sudo make runtest, I got following errors: 

[  FAILED  2 tests, listed below:

[  FAILED  LayerFactoryTest/0.TestCreateLayer, where TypeParam = caffe::CPUDevice<float>

[  FAILED  LayerFactoryTest/1.TestCreateLayer, where TypeParam = caffe::CPUDevice<double>


[----------] 1 test from LayerFactoryTest/0, where TypeParam = caffe::CPUDevice<float>

[ RUN      ] LayerFactoryTest/0.TestCreateLayer

src/caffe/test/test_layer_factory.cpp:47: Failure

Value of: layer->type()

  Actual: "MultiBoxLoss"

Expected: iter->first

Which is: "ACTCuboidLoss"

[  FAILED  ] LayerFactoryTest/0.TestCreateLayer, where TypeParam = caffe::CPUDevice<float> (33 ms)

[----------] 1 test from LayerFactoryTest/0 (33 ms total)


Later one when I train the model, the following line in a ACTdatalayer has problem:

images = [cv2.imread(d.imfile(v, frame+ii)).astype(np.float32) for ii in range(K)]


gives the error:

*** Aborted at 1510081044 (unix time) try "date -d @1510081044" if you are using GNU date ***

PC: @     0x7f0b733c2865 cv::Mat::copyTo()

*** SIGSEGV (@0x7f0b02010040) received by PID 1533 (TID 0x7f0b765eeac0) from PID 33620032; stack trace: ***

    @     0x7f0b742a44b0 (unknown)

    @     0x7f0b733c2865 cv::Mat::copyTo()

    @     0x7f0b40dd9695 pyopencv_from<>()

    @     0x7f0b40dda8f4 pyopencv_cv_imread()

    @     0x7f0b7490e751 PyEval_EvalFrameEx

    @     0x7f0b7490ce24 PyEval_EvalFrameEx

    @     0x7f0b74a3701c PyEval_EvalCodeEx

    @     0x7f0b7498d2e0 (unknown)

    @     0x7f0b749601e3 PyObject_Call

    @     0x7f0b749d431c (unknown)

    @     0x7f0b749601e3 PyObject_Call

    @     0x7f0b74a36447 PyEval_CallObjectWithKeywords

    @     0x7f0b74994f17 PyEval_CallFunction

    @     0x7f0b55354cc9 boost::python::call<>()

    @     0x7f0b55355370 caffe::PythonLayer<>::Forward_cpu()

    @     0x7f0b76178d92 caffe::Net<>::ForwardFromTo()

    @     0x7f0b76178fb7 caffe::Net<>::Forward()

    @     0x7f0b75fe1670 caffe::Solver<>::Step()

    @     0x7f0b75fe20fe caffe::Solver<>::Solve()

    @           0x40b631 train()

    @           0x407428 main

    @     0x7f0b7428f830 __libc_start_main

    @           0x407cf9 _start

    @                0x0 (unknown)

Segmentation fault (core dumped)


but if I just run python console, the imread() function has no problem


Thanks in advance!



jiao.z...@gmail.com

unread,
Mar 11, 2018, 2:15:16 PM3/11/18
to Caffe Users
Hi Have you solved this problem? I also have a similar problem with you.


I0311 17:25:25.356756 20563 layer_factory.hpp:77] Creating layer data
*** Aborted at 1520789126 (unix time) try "date -d @1520789126" if you are using GNU date ***
PC: @     0x7f2983229d53 std::_Hashtable<>::clear()
*** SIGSEGV (@0x9) received by PID 20563 (TID 0x7f2ae5780ac0) from PID 9; stack trace: ***
    @     0x7f2ae21c64b0 (unknown)
    @     0x7f2983229d53 std::_Hashtable<>::clear()
    @     0x7f29832224d6 google::protobuf::DescriptorPool::FindFileByName()
    @     0x7f29831da058 google::protobuf::python::cdescriptor_pool::AddSerializedFile()
    @     0x7f2ae28239f0 PyEval_EvalFrameEx
    @     0x7f2ae295905c PyEval_EvalCodeEx
    @     0x7f2ae28af46d (unknown)
    @     0x7f2ae2882273 PyObject_Call
    @     0x7f2ae28a2b75 (unknown)
    @     0x7f2ae2839173 (unknown)
    @     0x7f2ae2882273 PyObject_Call
    @     0x7f2ae282035c PyEval_EvalFrameEx
    @     0x7f2ae295905c PyEval_EvalCodeEx
    @     0x7f2ae281ada9 PyEval_EvalCode
    @     0x7f2ae28bc244 PyImport_ExecCodeModuleEx
    @     0x7f2ae28bcc1f (unknown)
    @     0x7f2ae28be390 (unknown)
    @     0x7f2ae28be658 (unknown)
    @     0x7f2ae28bf76b PyImport_ImportModuleLevel
    @     0x7f2ae28298b8 (unknown)
    @     0x7f2ae2882273 PyObject_Call
    @     0x7f2ae2958487 PyEval_CallObjectWithKeywords
    @     0x7f2ae281e7e6 PyEval_EvalFrameEx
    @     0x7f2ae295905c PyEval_EvalCodeEx
    @     0x7f2ae281ada9 PyEval_EvalCode
    @     0x7f2ae28bc244 PyImport_ExecCodeModuleEx
    @     0x7f2ae28bcc1f (unknown)
    @     0x7f2ae28be390 (unknown)
    @     0x7f2ae28be658 (unknown)
    @     0x7f2ae28bf76b PyImport_ImportModuleLevel
    @     0x7f2ae28298b8 (unknown)
    @     0x7f2ae2882273 PyObject_Call
Segmentation fault (core dumped)


Reply all
Reply to author
Forward
0 new messages