Giter VIP home page Giter VIP logo

yolov4_trt_ros's Issues

something went wrong when I run roslaunch

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/

SUMMARY

PARAMETERS

  • /rosdistro: melodic
  • /rosversion: 1.14.12
  • /yolov4_trt_node/category_number: 3
  • /yolov4_trt_node/confidence_threshold: 0.5
  • /yolov4_trt_node/input_shape: 416
  • /yolov4_trt_node/model: yolov4-tiny
  • /yolov4_trt_node/model_path: /home/nvidia/vola...
  • /yolov4_trt_node/show_image: True
  • /yolov4_trt_node/video_topic: /video_source/raw

NODES
/
yolov4_trt_node (yolov4_trt_ros/trt_yolo_v4.py)

ROS_MASTER_URI=http://localhost:11311

process[yolov4_trt_node-1]: started with pid [14393]
Traceback (most recent call last):
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/trt_yolo_v4.py", line 173, in
main()
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/trt_yolo_v4.py", line 163, in main
yolo = yolov4()
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/trt_yolo_v4.py", line 33, in init
(self.model_path + self.model), (self.h, self.w), self.category_num)
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/utils/yolo_with_plugins.py", line 220, in init
self.engine, grid_sizes)
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/utils/yolo_with_plugins.py", line 258, in allocate_buffers
3 * 7 * engine.max_batch_size
AssertionError
Exception ignored in: <bound method TrtYOLO.del of <utils.yolo_with_plugins.TrtYOLO object at 0x7f8cb90f28>>
Traceback (most recent call last):
File "/home/nvidia/volansjiahang/src/mid/image_process/yolov4_trt_ros/utils/yolo_with_plugins.py", line 224, in del
del self.outputs
AttributeError: outputs

PyCUDA ERROR: The context stack was not empty upon module cleanup.

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.

[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

compatibility with tensor rt8

thanks for such a efficient work but when I run on my system ;
Nvidia Xavier AGX
Jetpack 4.6
Cuda 10.2
Tensor rt8

It throws out error as below
image

Any idea to fix it?

Strange bounding boxes when batch processing

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 ?

gif

frame of interest

Thanks a lot for your time!

Issue with yolo_layer.cu

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:

  • Ubuntu 18.04
  • ROS Melodic
  • TensorRT 7.1.3.0
  • Cuda 10.2
  • OpenCV 4.2.0
  • Pycuda 2019.1.2

Any idea what could be the cause of this issue?

Thanks a lot!

Complet readme file

Hello,

In the part 3,after the "cd" command ,add the download command : "./download_yolo.sh"

Best regards
Minion40

[ERROR] [1636165170.171413]: bad callback: <bound method yolov4.img_callback of <__main__.yolov4 object at 0x7fa52a9910>

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()?

image

having a problem while running the node

Hello,
Im having the following problem while running the node:
Screenshot from 2021-01-28 21-24-04

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

USB camera

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

small question

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

object has no attribute'allocate_buffers'

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

  • /rosdistro: melodic
  • /rosversion: 1.14.13
  • /yolov4_trt_node/category_number: 10
  • /yolov4_trt_node/confidence_threshold: 0.5
  • /yolov4_trt_node/input_shape: 416
  • /yolov4_trt_node/model: yolov4
  • /yolov4_trt_node/model_path: /home/jetson/catk...
  • /yolov4_trt_node/show_image: True
  • /yolov4_trt_node/video_topic: /video_source/raw

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

setting /run_id to 291d39c4-29d0-11ed-b07f-60a4b7c96821
process[rosout-1]: started with pid [15212]
started core service [/rosout]
process[yolov4_trt_node-2]: started with pid [15215]
Traceback (most recent call last):
File "/home/jetson/catkin_ws/src/yolov4_trt_ros/trt_yolo_v4.py", line 175, in
main()
File "/home/jetson/catkin_ws/src/yolov4_trt_ros/trt_yolo_v4.py", line 164, in main
yolo = yolov4()
File "/home/jetson/catkin_ws/src/yolov4_trt_ros/trt_yolo_v4.py", line 35, in init
(self.model_path + self.model), (self.h, self.w), self.category_num)
File "/home/jetson/catkin_ws/src/yolov4_trt_ros/utils/yolo_with_plugins.py", line 221, in init
self.inputs, self.outputs, self.bindings, self.stream ,grid_sizes= self.allocate_buffers(self.engine, grid_sizes)
AttributeError: 'TrtYOLO' object has no attribute 'allocate_buffers'

PyCUDA ERROR: The context stack was not empty upon module cleanup.

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.
`

Something about the yolov4 can't work with a mp4 file or USB cam

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:

  1. roslaunch yolov4_trt_ros video_source.launch input:=/home/nvidia/oversize.mp4
  2. roslaunch yolov4_trt_ros yolov4_trt.launch

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:
Screenshot from 2021-04-24 02-22-25

I am looking forward to your reply as soon as possible,thank you very much!

Issues Running ./convert_yolo_trt.sh

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!

For help on ros message

I am using your code on the robot and it is currently running normally. I have two questions that need your help:

    1. The ros message needs to be sent when the target is detected, instead of sending it all the time.
      My goal is only one class of 'person'. Only when a person is detected, I need to send a message. I only need to publish a simple message like 'stop' to another node to receive it to control the robot's walking. How should I modify Code.
  1. I run on jetson nano, so I tend to use yolov3-ting or yolov4-tiny. Can you add these two models?
    Thank you for any help and look forward to receiving your reply. Thank you.
    @indra4837

error while running the "roslaunch yolov4_trt_ros yolov4_trt.launch", Ros melodic and python3 compatibility issues

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

Cannot lanuch node of type

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

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.