Some problem about GStreamer Python element

Hello. I’m new to GStreamer framework. I’m gonna do a job with GStreamer pipeline: read a video file or RTSP link from camera, convert buffer to numpy array, using YOLOv5 to detect some object, and convert numpy array to buffer, push that buffer to pipeline to visualize object detection result on computer monitor. But I have a problem that I can’t push the converted buffer to pipeline and can’t display result on monitor. This is my code:
test_pytorch.py (3.4 KB)
My code is run on PyTorch CPU library, with WSL2 (Ubuntu 22.04) on Windows 11.