ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
23.75k stars 4.74k forks source link

RTSP path is changed from the defined url when inference #11244

Open pornpra opened 2 weeks ago

pornpra commented 2 weeks ago

Search before asking

Question

I ran object tracking using YOLOv8 with an RTSP URL.

model = YOLO('yolov8s.pt', task='detect')
results = model.track(source, device=device, stream=True, classes=classes, verbose=False, stream_buffer=True, tracker=byte_track)
for pred in results:
    path = pred.path

During inference, I printed the path from the prediction results and noticed a change in the stream URL where certain characters were replaced e.g. : changed to , = changed to , and @ changed to _.

Original URL: rtsp://abcd:abcd123456@xx.xx.xx.x:yyy/trackID=1&streamID=1 Changed URL: rtsp_//abcd_abcd123456_xx.xx.xx.x_yyy/trackID_1_streamID_1

How can I return the original stream URL during inference ?

Additional

No response

pornpra commented 1 week ago

@glenn-jocher Do you have any updates for this issue ?

glenn-jocher commented 1 week ago

Hi there! I'm here to help with the issue.

Regarding the changes in the RTSP URL: it appears that URL sanitization is happening somewhere within the processing pipeline. This might be part of the logging or handling mechanism in the software to make URLs safe for display or storage.

To assist you further, could you confirm if you viewed this changed URL in logs or as output in your environment? Getting this detail could help pinpoint if it's a display issue or if the URL is being modified internally.

Looking forward to your response to help resolve this effectively!

pornpra commented 1 week ago

Hi

Today I tested four stream URLs, and I can confirm that all of them changed when I printed path from pred.path to my terminal.

Original URL: rtsp://abcd:abcd123456@xx.xx.xx.x:yyy/trackID=1&streamID=1 Changed URL: rtsp_//abcd_abcd123456_xx.xx.xx.x_yyy/trackID_1_streamID_1

(I am using Ultralytics version 8.0.200).