tossy0423 / yolov4-for-darknet_ros Goto Github PK
View Code? Open in Web Editor NEWThis is the environment in which YOLO V4 is ported to darknet_ros.
License: MIT License
This is the environment in which YOLO V4 is ported to darknet_ros.
License: MIT License
I am currently using ubuntu 20.04 noetic and I am trying to use yolo using the camera in the gazebo environment I am studying, but when I run roslaunch darknet_ros yolo_v4.launch, the following error occurs.
So, I tried to enter the path and chmod +x, but there is no node file and only the package folder name of the same name exists. I thought I didn't do devel/setup.bash, but I'm very embarrassed because I've already done it several times and reinstalled the package several times. Does anyone know a solution for this????
Hi .
Thank you for sharing.
I am working on Ubuntu 20.04 - ros noetic
Would it be a problem?other question: what about yolov5
Can I adapt for that?
I followed the instructions on the readme and I'm getting the following error:
CMake Error at yolov4-for-darknet_ros/darknet_ros/darknet_ros/CMakeLists.txt:181 (add_library):
Cannot find source file:
/home/zepedrofig/catkin_ws/src/darknet_ros/darknet/src/activation_layer.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: darknet_ros_lib
CMake Error: Cannot determine link language for target "darknet_ros_lib".
-- Generating done
-- Build files have been written to: /home/zepedrofig/catkin_ws/build
Invoking "cmake" failed
Any help with solving this would be much appreciated. Thanks!
Recently, I want to try to use the yolo model to make a project. The project needs do not need to be real-time. My current idea is to use the ros topic as a switch so that it does not always publish the recognition results, but only needs to judge a single photo, because I noticed that the program will Stuck in a while loop and repeating operations, even if I turn off the camera's topic, the results will continue to be output. I currently send a subscribe to my self-defined topic (string) and can't receive it. I would like to ask if the above idea is to be realized, the How to modify?
hello i am a colleage student in korea
thank you for your code
i want use yolo v4 -tiny because i want to improve fps
So, I downloaded the file 'yolov4-tiny.weights'.
I modified the file in the following path. (darknet_ros/darknet_ros/config/yolov4.yaml)
weight_file:
name: yolov4.weights -> name: yolov4-tiny.weights
but fps did not change
Is this a wrong approach
How can i do that
I'd appreciate it if you could answer.
Before apt update and upgrade recently, the package worked.
Now I am getting following errors when tried catkin_make again.
In file included from /usr/include/opencv4/opencv2/core/types_c.h:82:0,
from /home/r1mini/catkin_ws/src/yolov4-for-darknet_ros/darknet_ros/darknet_ros/include/darknet_ros/image_interface.h:13,
from /home/r1mini/catkin_ws/src/yolov4-for-darknet_ros/darknet_ros/darknet_ros/src/image_interface.c:9:
/usr/include/opencv4/opencv2/core/cvdef.h:690:4: error: #error "OpenCV 4.x+ requires enabled C++11 support"
# error "OpenCV 4.x+ requires enabled C++11 support"
^~~~~
compilation terminated due to -Wfatal-errors.
yolov4-for-darknet_ros/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/build.make:2282: recipe for target 'yolov4-for-darknet_ros/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/src/image_interface.c.o' failed
make[2]: *** [yolov4-for-darknet_ros/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/src/image_interface.c.o] Error 1
I have build installed opencv 3.4 on jetson nano using below cmake option
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D ENABLE_CXX11=ON \
-D WITH_TBB=OFF \
-D WITH_IPP=OFF \
-D WITH_1394=OFF \
-D BUILD_WITH_DEBUG_INFO=OFF \
-D BUILD_DOCS=OFF \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D WITH_QT=OFF \
-D WITH_GTK=ON \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.0/modules \
-D WITH_V4L=ON \
-D WITH_FFMPEG=ON \
-D WITH_XINE=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D PYTHON2_INCLUDE_DIR=/usr/include/python2.7 \
-D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include/ \
-D PYTHON2_PACKAGES_PATH=/usr/lib/python2.7/dist-packages \
-D PYTHON2_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so \
-D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \
-D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include/ \
-D PYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \
-D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
../
I also tried to add below option in CMakeList.txt but no luck.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
Any suggestions?
Thanks!
Hello!
I need to assign frame_id to the detection result similar to the input image. Currently it gets assigned "detection".
line 555 in YoloObjectDetector.cpp "msg.header.frame_id = "detection";"
waiting for your kind response.
When I catkin_make,
the error "/usr/include/opencv4/opencv2/core/cvdef.h:690:4: error: #error "OpenCV 4.x+ requires enabled C++11 support" occurs. I have tried all ways I can search online, but I cannot solve the problem.
Could you give some advice?
Thank you
Hi, I got this yolov4-for-darknet_ros works, can output a window with objects are detected.
But when I check the rostopics be published and try to use the rqt_image_view to load and show the rostopic /darknet_ros/detection_image , I got the problem with the topic can not be shown like this:
Do anyone have the same problem? How this can be solved?
Hello, does the detection model run with tkDNN support?
AlexeyAB/darknet#6067
Hello, I have encountered the following problems. Do you know how to solve them?
CUDA allocate done!
Waiting for image.
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/nano/opencv/opencv-3.4.10/modules/highgui/src/window.cpp, line 382
OpenCV exception: show_image_cv
[darknet_ros-1] process has died [pid 920, exit code -11, cmd /home/nano/workspace/devel/lib/darknet_ros/darknet_ros camera/rgb/image_raw:=camera/rgb/image_raw __name:=darknet_ros __log:=/home/nano/.ros/log/6288b334-b256-11eb-8105-8c554abe2ee0/darknet_ros-1.log].
log file: /home/nano/.ros/log/6288b334-b256-11eb-8105-8c554abe2ee0/darknet_ros-1.log
all processes on machine have died, roslaunch will exit*
shutting down processing monitor...
... shutting down processing monitor complete
done
Hello!
There seems to be insufficient memory for CUDA.
Do you know any solution?
Thanks!
Hello,
Thanks for combining all the stuffs for running yolo-v4 for ROS.
I was finally able to run YOLO with a webcam.
Resulting FPS I got is aroung 13.0~14.0 from my laptop running Intel Core i7-9750 with RTX2060.
Just wonder if GPU is running or not because I didn't change anything about the Makefile under darknet.
Is there a way to check whether the GPU is utilized?
Hello,
I wanted to know if I can limit the usage of GPU with is package.
The idea is to be able to use only 50% of the GPU (and only a portion of the CPU if the load is too high) for this particular package. In this way another model then would be run in the same GPU, so that two (not so heavy) networks can be run on the same GPU.
Hi, I am building your repo, but meet a problem that
[ 39%] Built target darknet_ros_msgs_generate_messages_nodejs
[ 39%] Built target darknet_ros_msgs_generate_messages
[ 40%] Building NVCC (Device) object yolov4-for darknet_ros/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/__/darknet/src/darknet_ros_lib_generated_activation_kernels.cu.obj activation_kernels.cu C:/Users/user/Documents/ros4/src/yolov4-for-darknet_ros/darknet_ros/darknet/include\darknet.h(17): fatal error C1083: 'pthread.h': No such file or directory
I found the pthread.h file was in
src\yolov4-for-darknet_ros\darknet_ros\darknet\3rdparty\pthreads\include\pthread.h
Hey @Tossy0423 ,
great job updating darket_ros to yolov4!
I would like to detect only one class in the image but unfortunately if you remove at least one label in yolov4 (3 as well).yaml darknet crashes exactly in the moment of the first detection.
Here the gdb output:
`[New Thread 0x7ffddffff700 (LWP 28236)]
[Thread 0x7ffde4b9c700 (LWP 28235) exited]
[ INFO] [1603404568.634471341]:
[ INFO] [1603404568.634548849]:
FPS:2101.4
[ INFO] [1603404568.634566248]: Objects:
Thread 42 "darknet_ros" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffddffff700 (LWP 28236)]
get_actual_detections (dets=dets@entry=0x7ffdc1b582a0, dets_num=, thresh=thresh@entry=0.300000012, selected_detections_num=selected_detections_num@entry=0x7ffddfffc4ac,
names=names@entry=0x555555e1aab0) at src/darknet_ros/darknet/src/image.c:300
300 int show = strncmp(names[j], "dont_show", 9);
(gdb) [darknet_ros-1] killing on exit
`
Please check this issue....
Thanks
Hi I installed all that you told...
now I want to real time object detection with realsense Camera ...
What should I do ....?
If I need to retrain a custom data set, how to do it in practice? I still need to copy the weight file after training in another computer. I cannot use this tool to retrain model ?
when 100%built,it shows that "undefined reference to `cv::imshow(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' ".
Does it mean the opencv linked failed?
I saw the instructions in README, but it only shows how to input webcam image, didn't show how to input rosbag. Could you please tell me how to read rosbag on this code? Thanks!!
When I run catkin_make, the output remind me to download yolov2-tiny.weights but I don't want to do this. What should I do?
-- Checking and downloading yolov2-tiny.weights if needed ...
-- ... file does not exist. Downloading now ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.