ThundeRatz / ros_yolo2

YOLOv2 integration with ROS
16 stars 14 forks source link

Cannot catkin_make #10

Closed Kn15263ss closed 7 years ago

Kn15263ss commented 7 years ago

Hi~ I have a little problem.. When i catkin_make, it encounter a problem: image image image

How do i fix this problem? Thanks you!!

tiagoshibata commented 7 years ago

Hi @Kn15263ss,

You seem to be using a too old GCC or CMake version. Our CMakeLists.txt sets CMAKE_CXX_STANDARD 11 (here), which should pass the -std=gnu++11 flag to g++ if using cmake >= 3.1. Updating CMake should make it recognize the variable and pass the -std=c++11 flag on to GCC.

Furthermore, in GCC > 6, the C++14 standard is the default one and the flag shouldn't be needed.

Try updating CMake and/or GCC and recompile. If updating your toolchain is not possible, this thread has a workaround to set the C++ standard on old versions of CMake.

Let me know if you need anything else!

Kn15263ss commented 7 years ago

Hi @tiagoshibata, thanks you! I have update my GCC and CMake to 7 and 3.2.2 image

image

but i have encounter a another problem: image

What happen about this?

Thanks you again!

tiagoshibata commented 7 years ago

Have you followed the instructions on README.md?

If building from source, change to the src directory of your workspace and use git clone --recursive https://github.com/tiagoshibata/ros_yolo2.git to download with submodules.

It seems like the darknet submodule wasn't cloned; try passing --recursive to git clone.

Kn15263ss commented 7 years ago

Thanks you very much!! It successful to run!

But, when I run it with webcam, and put on my own train xxx.cfg and xxx.weight file to data folder, then check the message from "rostopic echo /vision/yolo2/detections", then the result: image It seem cannot find any object.

I have test it on "./darknet detector demo data/obj.name cfg/yolo.cfg yolo.weight", it can do well. so..I don't know why,

Thanks you!

tiagoshibata commented 7 years ago

Are you training on YOLO9000 (the latest datknet version)? This repo uses an slightly older version of Darknet and some of the changes introduced with YOLO9000 might not work.

Try compiling the Darknet version used in this repository (submodule darknet) and running it. If it works on this Darknet version and fails in the nodelet, them it's a bug.

We have been using YOLO tiny successfully. The following configuration works with this Darknet version:

[net]
batch=64
subdivisions=16
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
max_batches = 40100
policy=steps
steps=-1,100,20000,30000
scales=.1,10,.1,.1

[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=1

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

###########

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=30
activation=linear

[region]
anchors = 1.08,1.19,  3.42,4.41,  6.63,11.38,  9.42,5.11,  16.62,10.52
bias_match=1
classes=1
coords=4
num=5
softmax=1
jitter=.2
rescore=1

object_scale=5
noobject_scale=1
class_scale=1
coord_scale=1

absolute=1
thresh = .6
random=1

We'll probably update the darknet version sometime, we just didn't need any of the newest features.

Kn15263ss commented 7 years ago

I have re-train a weights by use yolo-ting.cfg(follow your example), then it still didn't detect any object. image

tiagoshibata commented 7 years ago

You confidence level might be too high; try setting the node's confidence parameter to something lower. The default value is 0.8.

Just double checking, did you run it using the darknet version in this repository (the submodule in the darknet folder)?

Kn15263ss commented 7 years ago

I have two darknet folder, one is at my own path, the other is at your ros_yolo2 folder, and I test it(ex:./darknet detector demo xx xx) from my darknet. And, the confidence parameter, it value is 0.5.

tiagoshibata commented 7 years ago

Try lowering the confidence parameter in the node. If you're running ./darknet with 0.5 confidence and the node with the default value (0.8), that's probably the reason you aren't getting detections.

See this page for node parameter assignment or the README.md file if using a launchfile. Let me know if it solves your issue!

Kn15263ss commented 7 years ago

I have change the confidence from yolo2_nodelet.cpp to 0.5, and re-catkin_make. But, It is still not detecting ant object. image image

tiagoshibata commented 7 years ago

Hmm, that's weird... Which camera node/nodelet are you using? Are you sure the camera stream is correct? Have you tried the sample launchfile given in the README.md of this repo (using uvc_camera)?

Kn15263ss commented 7 years ago

I using uvc_camera/CameraNodelet to run it.

tiagoshibata commented 7 years ago

I can try to run it locally if you're willing to share your files, but it might take some time (I'm a bit busy at the moment).

Kn15263ss commented 7 years ago

It was push on google cloud: https://drive.google.com/open?id=0B3pT9uJW73uAb0MwVm0zYzBad1k And very thank you!!

Kn15263ss commented 7 years ago

@tiagoshibata Hi~ I have solved the problem, that can detecting object!! But, I don't know how I solved it :D... I just put my own data, label and config on your darknet from ros_yolo2, and train on it! Finally, It can detecting object! So..I don't know why I use my own darknet can't working, but use your can do it.

tiagoshibata commented 7 years ago

Great :) ! That's what I meant when I suggested using the Darknet version in the submodule of this repository. Darknet had breaking changes in the latest versions.