indra4837 / yolov4_trt_ros Goto Github PK
View Code? Open in Web Editor NEWYOLOv4 object detector using TensorRT engine
License: MIT License
YOLOv4 object detector using TensorRT engine
License: MIT License
nvidia@nvidia-desktop:~$ roslaunch yolov4_trt_ros yolov4_trt.launch
... logging to /home/nvidia/.ros/log/c52fbab6-92fa-11ec-9d08-48b02d15fa07/roslaunch-nvidia-desktop-14376.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://nvidia-desktop:35351/
PARAMETERS
NODES
/
yolov4_trt_node (yolov4_trt_ros/trt_yolo_v4.py)
ROS_MASTER_URI=http://localhost:11311
[yolov4_trt_node-1] process has died [pid 14393, exit code -6, cmd /home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/trt_yolo_v4.py __name:=yolov4_trt_node __log:=/home/nvidia/.ros/log/c52fbab6-92fa-11ec-9d08-48b02d15fa07/yolov4_trt_node-1.log].
log file: /home/nvidia/.ros/log/c52fbab6-92fa-11ec-9d08-48b02d15fa07/yolov4_trt_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
hello, can this repo used in pc x86 platform?
Hi!
I'm currently working on an object detection pipeline using yolov3. As the pipeline takes inputs from several cameras, I was thinking of using your trt_yolo_v4_batch.py script.
I tried it out with a yolov3-416 object detector and everything worked great. However, with yolov3-tiny-416, I am getting a weird behaviour. It seems like bounding boxes of a certain image are displayed on several image streams simultaneously.
For example, in the following gif, you can see that a bounding box is correctly displayed on the /detection_image/right image stream but the same bounding box is also displayed on the /detection_image/front image stream. I added a frame where this issue occurs.
Do you know what could be the issue here ?
Thanks a lot for your time!
Hi!
First of all, thanks a lot for your hard work on this great package!
I get an error when launching the launch file yolov3_trt.launch:
python3: yolo_layer.cu:71: nvinfer1::YoloLayerPlugin::YoloLayerPlugin(const void*, size_t): Assertion d == a + length' failed.
This is quite strange as I can see yolo_layer.cu comes from JK Jung's package and I was able to run his package with the same setup:
Any idea what could be the cause of this issue?
Thanks a lot!
Is your yolov4_trt_ros based on the https://github.com/jkjung-avt/tensorrt_demos . I am looking for this version of ros packaging. Thank you for your work.
Can your code run on jetson nano?
Does it support yolov3?
Is the ros version ros-melodic or ros2?
Looking forward to your reply。 @indra4837
Can build and compile ROS packages with the ROS Noetic?
Hello,
In the part 3,after the "cd" command ,add the download command : "./download_yolo.sh"
Best regards
Minion40
Hello, I ran into a problem as shown below:
I need your help, thank you very much
[ERROR] [1636165170.171413]: bad callback: <bound method yolov4.img_callback of <__main__.yolov4 object at 0x7fa52a9910>> Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/home/nvidia-yolov4/yolo_ros_trt/src/yolov4_trt_ros/trt_yolo_v4.py", line 112, in img_callback self.publisher(boxes, confs, clss) File "/home/nvidia-yolov4/yolo_ros_trt/src/yolov4_trt_ros/trt_yolo_v4.py", line 138, in publisher detection2d.header.stamp = rospy.Time.now() File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 155, in now return get_rostime() File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 190, in get_rostime raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?") ROSInitException: time is not initialized. Have you called init_node()?
Hello,
Im having the following problem while running the node:
Im using Jetson Xavier and trying to run yolov4 with video from my ZED2 camera.
the error is
ImportError: /home/greensail/cv_ws/devel/lib/python2.7/dist-packages/cv_bridge/boost/cv_bridge_boost.so: undefined symbol: _ZTIN5boost6python7objects21py_function_impl_baseE
Hello,
Can you help me to correct this error,
I use a USB camera as input.
roslaunch yolov4_trt_ros video_source.launch input:=v4l2://3
RLException: [video_source.launch] is neither a launch file in package [yolov4_trt_ros] nor is [yolov4_trt_ros] a launch file name
The traceback for the exception was written to the log file
Regards
Minion 40
Hello,
I put th commande
./convert_yolo_trt.sh
YOLOv3 or YOLOv4. Input 3 or 4
4
Do you want to download the model? [Y/N]
y
What is the input shape? Input 288 or 416 or 608
416
Creating yolov4-416.cfg and yolov4-416.weights
How many categories are there?
An d i have this question What should be done ?
thank you for your help
Regards
Minion40
I met some problem and i can't solve it.
i have two solve direction.
My python have error. My python version is 3.6.9
Cuda doesn't clear completely.
If i get some help, i will appreciate .
`PARAMETERS
NODES
/
yolov4_trt_node (yolov4_trt_ros/trt_yolo_v4.py)
auto-starting new master
process[master]: started with pid [15199]
ROS_MASTER_URI=http://localhost:11311
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
`
Hello,
Thank you for your looking my question in your busy schedule!
Platform: Jetson Nano
Ros-melodic
Ubuntu 18.04 based on arm
cv_bridge based on python3.6
I got a yolov4-416.trt Model using the ./download_yolo.sh and convert_yolo_trt.sh
Then I test the program with the command:
But with the process on, there is no output label or boxes results in the detection window YOLOv4 DETECTION RESULTS
you can see the image results as follow:
I am looking forward to your reply as soon as possible,thank you very much!
Hello, I am trying to setup yolo on my jetson nano.
I am very new to everything so i apologize if anything is unclear.
Right now I am running using the Jetpack 4.6.1, it seems like the only difference between our two implementations is the jetpack 4.6.1 comes with TensorRT 8.0.1, I already know that is impossible to downgrade to TensorRT 7 without downgrading the jetpack.
Everything runs in the covert_yolo_trt script until it runs the python script onnx_to_tensorrt.py.
I was wondering if there was a implementation of this onnx to tensorrt script for TensortRT 8.0.1, as it seems the script is having issues running on my version of TensortRT, thank you for any help!
I am using your code on the robot and it is currently running normally. I have two questions that need your help:
I want to use my custom trained yolo v8 model as a node/ plugin in ROS. How can I do that. Please guide.
Thanks in advance.
Regards
How to run python3 files with ros melodic as Ros melodic is purely based on python2.7.
I get this error while running "roslaunch yolov4_trt_ros yolov4_trt.launch", here is the error
Traceback (most recent call last):
File "/home/catkin_ws/src/yolov4_trt_ros/trt_yolo_v4.py", line 6, in
import cv2
File "/usr/lib/python3.6/dist-packages/cv2/init.py", line 89, in
bootstrap()
File "/usr/lib/python3.6/dist-packages/cv2/init.py", line 62, in bootstrap
], True)
File "/usr/lib/python3.6/dist-packages/cv2/init.py", line 56, in load_first_config
raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config-2.7.py', 'config-2.py']. Check OpenCV installation.
[yolov4_trt_node-1] process has died [pid 11630, exit code 1, cmd /home/catkin_ws/src/yolov4_trt_ros/trt_yolo_v4.py __name:=yolov4_trt_node __log:=/home/.ros/log/a39fb3ce-626c-11ec-a693-eae4f550af8b/yolov4_trt_node-1.log].
log file: /home/.ros/log/a39fb3ce-626c-11ec-a693-eae4f550af8b/yolov4_trt_node-1*.log
Hi Indra,
I am trying to run the same code in Xavier Nx.
When I try to run the final step, I get this error. Could you please help, where I am going wrong ?
thukhi@thukhi:~/catkin_ws/src/yolov4_trt_ros/launch$ roslaunch yolov4_trt_ros video_source.launch input:=file://sample.mp4
... logging to /home/thukhi/.ros/log/5e690190-b5db-11eb-b791-ec2e987b94d7/roslaunch-thukhi-16599.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://thukhi:35395/
SUMMARY
========
PARAMETERS
* /rosdistro: melodic
* /rosversion: 1.14.10
* /video_source/height: 360
* /video_source/loop: 0
* /video_source/resource: file://sample.mp4
* /video_source/width: 640
NODES
/
video_source (yolov4_trt_ros/video_source)
auto-starting new master
process[master]: started with pid [16609]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 5e690190-b5db-11eb-b791-ec2e987b94d7
process[rosout-1]: started with pid [16620]
started core service [/rosout]
ERROR: cannot launch node of type [yolov4_trt_ros/video_source]: Cannot locate node of type [video_source] in package [yolov4_trt_ros]. Make sure file exists in package path and permission is set to executable (chmod +x)
^C[rosout-1] killing on exit
^C[master] killing on exit
^Cshutting down processing monitor...
... shutting down processing monitor complete
done
How to run python3 files with ros melodic as Ros melodic is purely based on python2.7.
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.