Closed Anthonia2001 closed 1 year ago
Hi @Anthonia2001 Are the modified code from yolov5s.pt model and the modified predict.py two separate scripts? Both contain a pipe start instruction.
So if the modified yolov5s.pt script was run first and then the modified predict.py script was run secondly afterwards, the camera would be 'busy' for the predict.py script because the yolov5s.pt script would have already started the camera's pipeline.
Hi! Thanks for your reply. yeah, They are two different scripts. The code from yolov5s.pt model and the code from yolov5s-seg.pt model are in two different projects. After I stop execute the script from the yolov5s model, and run the modified predict.py script from other project. The camera is busy.
On Sat, 11 Nov 2023 at 15:03 MartyG-RealSense @.***> wrote:
Hi @Anthonia2001 https://github.com/Anthonia2001 Is the modified code from yolov5s.pt model and the modified predict.py two separate scripts? Both contain a pipe start instruction.
So if the modified yolov5s.pt script was run first and then the modified predict.py script was run secondly afterwards, the camera would be 'busy' for the predict.py script because the yolov5s.pt script would have already started the camera's pipeline.
— Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/12391#issuecomment-1806738560, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDB42XRLNZYSNSZ3CQ5TZITYD4WO5AVCNFSM6AAAAAA7GGMYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWG4ZTQNJWGA . You are receiving this because you were mentioned.Message ID: @.***>
If you reboot your computer and then run predict.py first without running the yolov5s.pt script beforehand and it works, that could indicate that the method by which you stop executing the yolov5s.pt script is not properly closing down the pipeline, preventing it from working properly when predict.py is run.
Yeah, actually I have tried what you say before. I shut down my PC and then start with the predict.py first but it still doesn’t work. I think that maybe it is some conflicts between rs and yolov5s-seg.pt model on Ubuntu right? On Sat, 11 Nov 2023 at 15:44 MartyG-RealSense @.***> wrote:
If you reboot your computer and then run predict.py first without running the yolov5s.pt script beforehand and it works, that could indicate that the method by which you stop executing the yolov5s.pt script is not properly closing down the pipeline, preventing it from working properly when predict.py is run.
— Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/12391#issuecomment-1806752727, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDB42XREKI7MVUVEM3ACRQDYD43FLAVCNFSM6AAAAAA7GGMYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWG42TENZSG4 . You are receiving this because you were mentioned.Message ID: @.***>
You are the first RealSense user to report having used yolov5s-seg so there is no way to be certain. It would be reasonable to conclude though that if yolov5 works and yolov5s-seg does not then there is an issue with yolov5s-seg specifically.
Really appreciate for your help. I have uploaded the issue on the yolov5 github. Hope that I will find a solution. On Sat, 11 Nov 2023 at 15:53 MartyG-RealSense @.***> wrote:
You are the first RealSense user to report having used yolov5s-seg so there is no way to be certain. It would be reasonable to conflude though that if yolov5 works and yolov5s-seg does not then there is an issue with yolov5s-seg specifically.
— Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/12391#issuecomment-1806754751, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDB42XRPQOOIV5EB45ENITDYD44JFAVCNFSM6AAAAAA7GGMYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWG42TINZVGE . You are receiving this because you were mentioned.Message ID: @.***>
You are very welcome. I'm pleased that I could be of help. Good luck!
Thanks a lot. Have a nice weekend!
On Sat, 11 Nov 2023 at 15:58 MartyG-RealSense @.***> wrote:
You are very welcome. I'm pleased that I could be of help. Good luck!
— Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/12391#issuecomment-1806755534, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDB42XROKZZB6QMUZ4CTMD3YD44ZXAVCNFSM6AAAAAA7GGMYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWG42TKNJTGQ . You are receiving this because you were mentioned.Message ID: @.***>
Case closed due to no further comments received.
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
Hi! I'm applying yolov5 to detect object and publish data to my ROS node. And I also install librealsense from this link: (https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md) with CMake and including the flag -DFORCE_RSUSB_BACKEND=TRUE in the CMake build instruction. And pyrealsense2 with pip install
At first, when I modified and run this code from yolov5s.pt model
The program works without any bugs and errors, I can still open realsense depth camera and take the x,y,z value and transfer to my other ROS node.
Then, as the complex task of detection, I need to use yolov5s-seg.pt model. At begining, I run the code predict.py from the git hub source**: https://github.com/ultralytics/yolov5/blob/master/segment/predict.py. The program still works. I keep modifying this code by adding pyrealsense and pipe.start(cfg) and run this by python3 predict.py --source 4 (which is RGB channel of Realsense)
It appears and error:
And with the code above, and move the code to open realsense camera into def get_frame stream() function. The camera is open but when the camera can detect a thing, the program is crashed and gives the errors:
Environment
YOLOv5 🚀 2023-10-3 Python-3.8.10 torch-2.1.0+cu118 CUDA:0 (NVIDIA GeForce RTX 3050 Laptop GPU, 3910MiB) OS: Ubuntu 20.04 Python version: 3.8.10 distributed with ROS Noetic