GithubHelp home page GithubHelp logo

harick1 / caffe-yolo Goto Github PK

View Code? Open in Web Editor NEW
231.0 23.0 160.0 8.14 MB

Caffe for YOLO

License: Other

CMake 2.74% Makefile 0.69% Shell 0.36% Python 8.11% C++ 79.97% Cuda 5.60% MATLAB 0.89% M 0.01% Protocol Buffer 1.65%

caffe-yolo's Introduction

CAFFE for YOLO

Reference

You Only Look Once: Unified, Real-Time Object detection

http://arxiv.org/abs/1506.02640

http://www.yeahkun.com/2016/09/06/object-detection-you-only-look-once-caffe-shi-xian/

Usage

Data preparation

  cd data/yolo
  ln -s /your/path/to/VOCdevkit/ .
  python ./get_list.py
  # change related path in script convert.sh
  ./convert.sh 

Train

  cd examples/yolo
  # change related path in script train.sh
  mkdir models
  nohup ./train.sh &

Test

  # if everything goes well, the map of gnet_yolo_iter_32000.caffemodel may reach ~56.
  cd examples/yolo
  ./test.sh model_path gpu_id
  The model is here (link: https://pan.baidu.com/s/1jHAN6xK password: kvee)

caffe-yolo's People

Contributors

harick1 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

caffe-yolo's Issues

56 of what?

Hello, great work!
"the map of gnet_yolo_iter_32000.caffemodel may reach ~56", what do you mean? 56 of what?

Probelm when running ./convert.sh.

CC@yeahkun, there is a problem when running ./convert.sh.
The error shows"./data/yolo/convert.sh: line 27: ../../tools/convert_box_data: No such file or directory".

Based on my path, I changed some lines of the file of "convert.sh" like : $CAFFE_ROOT/tools/convert_box_data --resize_width=$RESIZE_W --resize_height=$RESIZE_H \

As I tried many times of the path problem, and the convert_box_data file is actually under the path, but there still exists this problem. " No such file or directory".

Do you know how to solve this problem?

Thank you!

why add multi_label_ in Batch?

Hi, thanks for the code. I have two questions
1.
in code

template <typename Dtype>
class Batch {
 public:
  Blob<Dtype> data_, label_;
  // vector<Blob<Dtype> > multi_label_;
  vector<shared_ptr<Blob<Dtype> > > multi_label_;
};

what does multi_label_ for ?

  1. you have
vector<int> sides_;

in BoxDataLayer, and in yolo,should it be only one side (7) ?

demo app

Do you have a demo app which shows detection results with an input image?

Thanks,

I got this error 'std::bad_alloc'

Hi, when i'm trying to run ./train.sh i got this error

I0206 19:07:41.957289 4240 db_lmdb.cpp:35] Opened lmdb ../../data/yolo/lmdb/trainval_lmdb
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
*** Aborted at 1486375661 (unix time) try "date -d @1486375" if you are using GNU date ***
PC: @ 0x7fcc79408428 gsignal
*** SIGABRT (@0x3e800001088) received by PID 4232 (TID 0x7fcc4b6f0700) from PID 4232; stack trace: ***

and when i'm trying to run ./test.sh, i got this error

I0206 19:08:18.079627 4259 layer_factory.hpp:77] Creating layer data
I0206 19:08:18.079963 4259 net.cpp:91] Creating Layer data
I0206 19:08:18.079974 4259 net.cpp:399] data -> data
I0206 19:08:18.079996 4259 net.cpp:399] data -> label
I0206 19:08:18.081296 4267 db_lmdb.cpp:35] Opened lmdb ../../data/yolo/lmdb/test2007_lmdb
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)

I think the dataset is the problem, but i followed your readme.
i ran convert.sh
Please tell me what is wrong.

Error while running convert script

I got the following error while running the convert script:

./convert.sh
I0411 21:43:24.670166 5449 convert_box_data.cpp:99] Shuffling data
I0411 21:43:24.670377 5449 convert_box_data.cpp:102] A total of 0 images.
F0411 21:43:24.670413 5449 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir ../../data/yolo/trainval.txt failed
*** Check failure stack trace: ***
@ 0x7f6b8c3d05cd google::LogMessage::Fail()
@ 0x7f6b8c3d2433 google::LogMessage::SendToLog()
@ 0x7f6b8c3d015b google::LogMessage::Flush()
@ 0x7f6b8c3d2e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f6b8c7eff80 caffe::db::LMDB::Open()
@ 0x4043dd main
@ 0x7f6b8b341830 __libc_start_main
@ 0x4055c9 _start
@ (nil) (unknown)
Aborted (core dumped)

How to train with my own dataset?

Hi, thanks for sharing this excellent project. I've successfully trained it on VOC dataset and got pretty good result and speed, but when I try to train it using my own dataset(with only 1 class). It always get 0 mAP and nan loss as testing.
I've already change the num_class in detect_loss layer and associated params in reg_reshape and the last conv layer and I've pre-proccessed my input data(reshape and subtract mean value).
What confuse me is the meaning of the other params in detect_loss layer like coord_scale, noobject_scale...Should I change them for new dataset? If so, how should I calculate them? Thanks in advance!

13.7% mAP

I follow your instruction,but I only get 13.7% mAP on the test2007. If I change the test source,I can get 75% mAP on the trainval.

How to compute AP or Recall?

Thank you for attention!

In the caffe-yolo, how can I evaluate my caffemodel for my test set? There's no Precision, Recall or AP when I ran ./test.sh. Anybody knows about the script or command to compute AP or sth?
BTW, what command can be used to detect an image and show the detection results?

Thank you for your replying!

error when run ./convert.sh

@yeahkun, i meet a problem when running ./convert.sh

I1227 15:21:08.608003 22007 convert_box_data.cpp:99] Shuffling data
I1227 15:21:08.908648 22007 convert_box_data.cpp:102] A total of 7970 images.
F1227 15:21:08.908772 22007 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir ./lmdb/trainval_lmdb failed
*** Check failure stack trace: ***
@ 0x7f01d0f895cd google::LogMessage::Fail()
@ 0x7f01d0f8b433 google::LogMessage::SendToLog()
@ 0x7f01d0f8915b google::LogMessage::Flush()
@ 0x7f01d0f8be1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f01d136e7d0 caffe::db::LMDB::Open()
@ 0x4043bd main
@ 0x7f01cf290830 __libc_start_main
@ 0x4055a9 _start
@ (nil) (unknown)
Aborted

Do you know how to solve this problem?

Thank you!

train.sh error

I1011 14:29:46.477924 3336 layer_factory.hpp:77] Creating layer data
I1011 14:29:46.478485 3336 net.cpp:91] Creating Layer data
I1011 14:29:46.478508 3336 net.cpp:399] data -> data
I1011 14:29:46.478564 3336 net.cpp:399] data -> label
I1011 14:29:46.483533 3340 db_lmdb.cpp:35] Opened lmdb /home/xiaoxue/caffe-yolo/data/yolo/lmdb/trainval_lmdb
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
*** Aborted at 1507703386 (unix time) try "date -d @1507703386" if you are using GNU date ***
PC: @ 0x7fcda05411d7 __GI_raise
*** SIGABRT (@0x3eb00000d08) received by PID 3336 (TID 0x7fcd7ed2b700) from PID 3336; stack trace: ***
@ 0x7fcda08dc370 (unknown)
@ 0x7fcda05411d7 __GI_raise
@ 0x7fcda05428c8 __GI_abort
@ 0x7fcda639d9d5 (unknown)
@ 0x7fcda639b946 (unknown)
@ 0x7fcda639b973 (unknown)
@ 0x7fcda639bb93 (unknown)
@ 0x7fcda63f0967 (unknown)
@ 0x7fcda63fac92 (unknown)
@ 0x7fcda63fc531 (unknown)
@ 0x7fcda63fc5ed (unknown)
@ 0x7fcdb216239a caffe::db::LMDBCursor::value()
@ 0x7fcdb1ff05fb caffe::DataReader::Body::read_one()
@ 0x7fcdb1ff09f4 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7fcdb1fff710 caffe::InternalThread::entry()
@ 0x7fcda685727a (unknown)
@ 0x7fcda08d4dc5 start_thread
@ 0x7fcda060373d __clone
train.sh: 行 11: 3336 已放弃 (吐核)$CAFFE_HOME/build/tools/caffe train --solver=$SOLVER --weights=$WEIGHTS --gpu=0,1,2,3,4,5,6,7

Check failed: status.ok() Failed to open leveldb IO error: /LOCK: Permission denied

When run make runtest, the error as follow and the program stopped.
[----------] 1 test from LayerFactoryTest/1, where TypeParam = caffe::CPUDevice
[ RUN ] LayerFactoryTest/1.TestCreateLayer
F0313 23:35:42.028887 9699 db_leveldb.cpp:16] Check failed: status.ok() Failed to open leveldb
IO error: /LOCK: Permission denied
*** Check failure stack trace: ***
@ 0x7f636c8ce5cd google::LogMessage::Fail()
@ 0x7f636c8d0433 google::LogMessage::SendToLog()
@ 0x7f636c8ce15b google::LogMessage::Flush()
@ 0x7f636c8d0e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f636a402be3 caffe::db::LevelDB::Open()
@ 0x7f636a478466 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7f636a444ac5 caffe::InternalThread::entry()
@ 0x7f636ad465d5 (unknown)
@ 0x7f6369b0a6ba start_thread
@ 0x7f636984082d clone
@ (nil) (unknown)
Makefile:523: recipe for target 'runtest' failed
make: *** [runtest] Aborted (core dumped)
How can I do for run successfully? Thank you!

About the gnet_deploy.prototxt

I want to detect a image through gnet_deploy.prototxt,but i think the gnet_deploy.prototxt file is wrong,who has the same experience?

undefined reference to `float caffe::Calc_iou

Good job you have done!

but i met a problem when complilation. like this:

CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin .build_release/lib/libcaffe.so: undefined reference to float caffe::Calc_iou(std::vector<float, std::allocator > const&, std::vector<float, std::allocator > const&)'
collect2: ld returned 1 exit status
make64: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1`

negative examples

I would like to use negative examples (images of background containing none of the objects to detect).
Is it possible to use such examples?

For negative examples, I captured background images and associated them with xml files containing no <object> tag.

  • The ./convert script (in data/yolo) works fine
  • The ./train script (in example/yolo) exits with the following error
    .... data_transformer.cpp:135] Check failed: float_size > 0 (0 vs. 0) Everysample must have label

Any idea or suggestion?

About the "regression" layer

Dear yeahkun:
Thanks for your hard-working. I really enjoy this model.
However, I have a question from gnet_train.prototxt & gnet_test.prototxt
The top layer of "reg_reshape" layer is "regression" which is not defined.
And, the bottom layer of "det_loss" is "regression".
I looked up the layer definition of caffe, and there is no "regression" layer.
Your caffe didn't define it too.
My question is why this layer is necessary.
Can we simply change the top layer of "reg_reshape" to itself and the bottm layers of "det_loss" to "reg_reshape" & "label". That is to say, we simply ignore the "regression" layer?
I look forward to your reply. Thank you very much

Best,

Alex

layer {
  name: "reg_reshape"
  type: "Reshape"
  bottom: "conv_reg"
  top: "regression"
  reshape_param {
    axis: 1
    shape {
      dim: 539 #735
    }
  }
}
layer {
  name: "det_loss"
  type: "DetectionLoss"
  bottom: "regression"
  bottom: "label"
  top: "det_loss"
  loss_weight: 1
  detection_loss_param {
    side: 7
    num_class: 1
    num_object: 2
    object_scale: 1.0
    noobject_scale: 0.6 #0.5
    class_scale: 1.0
    coord_scale: 1.0
    sqrt: true
    constriant: true
  }
}

Error when sh train.sh

I1011 13:21:52.582196 1555 layer_factory.hpp:77] Creating layer data
I1011 13:21:52.582789 1555 net.cpp:91] Creating Layer data
I1011 13:21:52.582813 1555 net.cpp:399] data -> data
I1011 13:21:52.582852 1555 net.cpp:399] data -> label
I1011 13:21:52.585772 1559 db_lmdb.cpp:35] Opened lmdb ../../data/yolo/lmdb/trainval_lmdb
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
*** Aborted at 1507699312 (unix time) try "date -d @1507699312" if you are using GNU date ***
PC: @ 0x7f25528c41d7 __GI_raise
*** SIGABRT (@0x3eb00000613) received by PID 1555 (TID 0x7f25310ae700) from PID 1555; stack trace: ***
@ 0x7f2552c5f370 (unknown)
@ 0x7f25528c41d7 __GI_raise
@ 0x7f25528c58c8 __GI_abort
@ 0x7f25587209d5 (unknown)
@ 0x7f255871e946 (unknown)
@ 0x7f255871e973 (unknown)
@ 0x7f255871eb93 (unknown)
@ 0x7f255871f12d (unknown)
@ 0x7f255877dc79 (unknown)
@ 0x7f255877f531 (unknown)
@ 0x7f255877f5ed (unknown)
@ 0x7f25644e539a caffe::db::LMDBCursor::value()
@ 0x7f25643735fb caffe::DataReader::Body::read_one()
@ 0x7f25643739f4 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7f2564382710 caffe::InternalThread::entry()
@ 0x7f2558bda27a (unknown)
@ 0x7f2552c57dc5 start_thread
@ 0x7f255298673d __clone
train.sh: 行 11: 1555 已放弃 (吐核)$CAFFE_HOME/build/tools/caffe train --solver=$SOLVER --weights=$WEIGHTS --gpu=0,1,2,3,4,5,6,7

Anyone can help me to solve this error? Thanks!

Question about the meaning of the parameter "side" in the data_param part of data layer in gnet_test.prototxt

Hi yeahkun,

Thank you for your work. I am using your caffe-yolo to do test while there is no resonable show about the bounding boxes and classification score. When I debug the code, I found the parameter "side" in the data_param part in the data layer of the file "gnet_yolo" and it can not be changed from 7. But I don't know the meaning of it. So can you show me what is the function of this parameter?

Thanks

Wenchi

Error when running ./train.sh

Hi, all
Thanks for the great work, however, after I had successfully built the project, when I run the ./train.sh
as the Instruction, I got the following errors:

I0704 20:04:44.497009 3437 detection_loss_layer.cpp:195] loss: 12.4513 class_loss: 1.42166 obj_loss: 1.15493 noobj_loss: 0.0112895 coord_loss: 3.98269 area_loss: 5.88071
I0704 20:04:44.497074 3437 detection_loss_layer.cpp:198] avg_iou: 0.00625067 avg_obj: -0.0611011 avg_no_obj: -0.0240547 avg_cls: -0.01719 avg_pos_cls: 0.00288896
*** Aborted at 1499169884 (unix time) try "date -d @1499169884" if you are using GNU date ***
PC: @ 0x7fcd02fc9f47 saxpy_kernel_16
*** SIGILL (@0x7fcd02fc9f47) received by PID 3361 (TID 0x7fccf6168700) from PID 50110279; stack trace: ***
@ 0x7fcd0261d100 (unknown)
@ 0x7fcd02fc9f47 saxpy_kernel_16
@ 0x7fcd02fca13f saxpy_k
@ 0x7fcd02fc5540 legacy_exec
@ 0x7fcd02fc56fb blas_thread_server
@ 0x7fcd02615dc5 start_thread
@ 0x7fcd02342ced __clone
./train.sh: line 10: 3361 Illegal instruction $CAFFE_HOME/build/tools/caffe train --solver=$SOLVER --weights=$WEIGHTS --gpu=0,1

Could someone tell me why this problem occurs? Thank you.

Differences to normal caffe branch

Hello,

I would like to know what the differences to the normal caffe branches are, despite the shell scripts? Are there any special layers implemented ?

Thank you very much

Error

compiles ok, when I run test with given model (downloaded) and gpu id it throws error:

}
layer {
name: "inception_5a/r
I0711 15:31:03.353759 24239 layer_factory.hpp:77] Creating layer data
I0711 15:31:03.354830 24239 net.cpp:91] Creating Layer data
I0711 15:31:03.354841 24239 net.cpp:399] data -> data
I0711 15:31:03.354862 24239 net.cpp:399] data -> label
F0711 15:31:03.355337 24247 db_lmdb.hpp:15] Check failed: mdb_status == 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***
@ 0x7fbd435375cd google::LogMessage::Fail()
@ 0x7fbd43539433 google::LogMessage::SendToLog()
@ 0x7fbd4353715b google::LogMessage::Flush()
@ 0x7fbd43539e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7fbd43b9a110 caffe::db::LMDB::Open()
@ 0x7fbd43bac8a6 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7fbd43b4a505 caffe::InternalThread::entry()
@ 0x7fbd392f55d5 (unknown)
@ 0x7fbd38ba36ba start_thread
@ 0x7fbd428ac3dd clone
@ (nil) (unknown)
Aborted (core dumped)

Any heads up on this?

Is it a bug for the origin code in darknet for computing IOU in the loss layer?

Hi, @yeahkun

Thanks for your nice work. I compared the code with the origin darknet. All pieces of code were understood expect the IOU computing in the loss layer.

In fact, the difference was in the computing for the x, y of the Box (center of the objection).

Ind darknet, the x, y were computed (by divided by l.side) in "detection_layer.c".

`

            box truth = float_to_box(net.truth + truth_index + 1 + l.classes, 1);
            truth.x /= l.side;
            truth.y /= l.side;

            for(j = 0; j < l.n; ++j){
                int box_index = index + locations*(l.classes + l.n) + (i*l.n + j) * l.coords;
                box out = float_to_box(l.output + box_index, 1);
                out.x /= l.side;
                out.y /= l.side;

                if (l.sqrt){
                    out.w = out.w*out.w;
                    out.h = out.h*out.h;
                }

                float iou  = box_iou(out, truth);

`

While in caffe-yolo, the x, y were computed:

`
if (constriant_) {
true_box[0] = true_box[0] * side_ - Dtype(j % side_);
true_box[1] = true_box[1] * side_ - Dtype(j / side_);
}

`

The difference lays in whether to take a Dtype(j % side_) item for translate the cell relative position to the image relative position. I think your code is correct. But I am not sure.

The dimensionality of the last conv's output is 6*6*30,but how can we reshape it to 1470。

layer {
name: "conv_reg"
type: "Convolution"
bottom: "add_conv2"
top: "conv_reg"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 30 ################output :6 * 6 * 30
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "reg_reshape"
type: "Reshape"
bottom: "conv_reg"
top: "regression"
reshape_param {
axis: 1
shape {
dim: 1470 #############but here is 7 * 7 * 30, whish is (classes+num_object*5) * side *side
}
}
}
Your input is 448 * 448, but the feature map of last conv layer is 6 * 6, then the output should be 6 * 6 * 30 = 1080. So should we reshape to 1080 instead of 1470?
look forward to your reply, thanks

train label

hei ,i have a question is if a cell(one of 49),if this cell is responsible for an object ,we will set the values of class+confidence+x+y+g+h ,, but ,if the cell don't responsible for an object, does it's values all set to zero?

train.sh

F0520 14:52:10.337806 11844 relu_layer.cu:26] Check failed: error == cudaSuccess (9 vs. 0) invalid configuration argument
*** Check failure stack trace: ***
@ 0x7ff5c51b65cd google::LogMessage::Fail()
@ 0x7ff5c51b8433 google::LogMessage::SendToLog()
@ 0x7ff5c51b615b google::LogMessage::Flush()
@ 0x7ff5c51b8e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7ff5c59dcdda caffe::ReLULayer<>::Forward_gpu()
@ 0x7ff5c585cbe2 caffe::Net<>::ForwardFromTo()
@ 0x7ff5c585cd07 caffe::Net<>::Forward()
@ 0x7ff5c57e4070 caffe::Solver<>::Step()
@ 0x7ff5c57e4b09 caffe::Solver<>::Solve()
@ 0x40b408 train()
@ 0x4075a8 main
@ 0x7ff5c3c6b830 __libc_start_main
@ 0x407d19 _start
@ (nil) (unknown)
Aborted (core dumped)
can any one help find out what is the problem

About Mirror

if (mirror) { box_label.box_[0] = std::max(0., 1. - box_label.box_[0]); box_label.box_[1] = std::max(0., 1. - box_label.box_[1]); }

Filp by Y axis. Is the code incorrect? I think that we just need
box_label.box_[0] = std::max(0., 1. - box_label.box_[0]);

Build Error. Why it is obligatory to use GPU?

In file included from ./include/caffe/common.hpp:19:0,
from ./include/caffe/blob.hpp:8,
from ./include/caffe/layers/detection_loss_layer.hpp:6,
from src/caffe/layers/detection_loss_layer.cpp:6:
./include/caffe/util/device_alternate.hpp:15:36: error: no ‘void caffe::DetectionLossLayer::Forward_gpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&)’ member function declared in class ‘caffe::DetectionLossLayer’
const vector<Blob>& top) { NO_GPU; }
^
src/caffe/layers/detection_loss_layer.cpp:222:1: note: in expansion of macro ‘STUB_GPU’
STUB_GPU(DetectionLossLayer);
^
./include/caffe/util/device_alternate.hpp:19:39: error: no ‘void caffe::DetectionLossLayer::Backward_gpu(const std::vector<caffe::Blob
>&, const std::vector&, const std::vector<caffe::Blob>&)’ member function declared in class ‘caffe::DetectionLossLayer’
const vector<Blob
>& bottom) { NO_GPU; }
^
src/caffe/layers/detection_loss_layer.cpp:222:1: note: in expansion of macro ‘STUB_GPU’
STUB_GPU(DetectionLossLayer);
^
Makefile:572: recipe for target '.build_release/src/caffe/layers/detection_loss_layer.o' failed
make: *** [.build_release/src/caffe/layers/detection_loss_layer.o] Error 1
make: *** Waiting for unfinished jobs....

error while runing convert.sh

F0512 19:52:53.086220 2486 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir ./lmdb/trainval_lmdb failed
*** Check failure stack trace: ***
@ 0x7faa55e7c5cd google::LogMessage::Fail()
@ 0x7faa55e7e433 google::LogMessage::SendToLog()
@ 0x7faa55e7c15b google::LogMessage::Flush()
@ 0x7faa55e7ee1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7faa5624a9a0 caffe::db::LMDB::Open()
@ 0x4043dd main
@ 0x7faa54ded830 __libc_start_main
@ 0x4055c9 _start
@ (nil) (unknown)
Aborted (core dumped)
any help for this problem

label.mdb

Hi,

After running ./convert.sh in lmdb/traim_lmdb/ only data.mdb and lock.mdb get created. Should label.mdb be also created?

I get this error when i run train.sh
I0430 19:03:23.413301 157396 layer_factory.hpp:77] Creating layer data
I0430 19:03:23.413415 157396 net.cpp:91] Creating Layer data
I0430 19:03:23.413426 157396 net.cpp:399] data -> data
I0430 19:03:23.413439 157396 net.cpp:399] data -> label
F0430 19:03:23.413650 157400 db_lmdb.hpp:15] Check failed: mdb_status == 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***
@ 0x7fe8fdd455cd google::LogMessage::Fail()
@ 0x7fe8fdd47433 google::LogMessage::SendToLog()
@ 0x7fe8fdd4515b google::LogMessage::Flush()
@ 0x7fe8fdd47e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7fe8fe107080 caffe::db::LMDB::Open()
@ 0x7fe8fe172cf6 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7fe8f9a925d5 (unknown)
@ 0x7fe8f93406ba start_thread
@ 0x7fe8fd0ba41d clone
@ (nil) (unknown)
Aborted (core dumped)

Any idea?

几个实现的小细节

Hi, hukun,
I found your code has some difference with the author's, I think it is reasonable, and it indeed work well.
I also implemented the detection layer in python, but my training is not so smooth.
I would appreciate if you to do some explaination for the differences kindly:
1.
` // if sqrt_ is true, it should have sqrt with respect to 'w' and 'h'

for (int o = 0; o < 4; ++o) {
diff[box_index + o * locations] = coord_scale_ * (best_box[o] - true_box[o]);
}
`

`// truth.x /= l.side... instead

  if (constriant_) {
    true_box[0] = true_box[0] * side_ - Dtype(j % side_);
    true_box[1] = true_box[1] * side_ - Dtype(j / side_);
  }

`

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.