Please provide complete information as applicable to your setup.
• Jetson Nano B01 • DeepStream 5.1 • JetPack Version 4.5 • TensorRT Version 7.1.3 • Question type • Requirement details: Get bounding box data (XY coordinates for each ID object)
Hi,
I am reusing the Deepstream sample with Python API.
The sample that I am using is deepstream_test_2 which is in /deepstream-5.1/sources/deepstream_python_apps/apps/deepstream-test2 directory.
By default, this example reports only the quantity of people/vehicles being tracked. The output message format is something like:
Frame Number=402 Number of Objects=3 Vehicle_count=1 Person_count=2
What I would like to get additionally is the XY coordinates of each object ID tracked but I do not know where can I report this data while the video streaming is running. For example, I want a report message like:
Frame Number=402 Number of Objects=3 Vehicle_count=1 Person_count=2
> ID=1 Object=Person Centroid(x,y)=250,100
> ID=3 Object=Person Centroid(x,y)=300,650
> ID=15 Object=Car Centroid(x,y)=600,500
This is a output example just to explain the additional information that I would like to acquire.
Which file or function could I acquire this information? and how can I report that?
Right, but I am using Python API in Deepstream samples.
According to the python script in deepstream-test2 i think that I could get the desired information by acquiring the information printed in this few lines:
for trackobj in pyds.NvDsPastFrameObjBatch.list(pPastFrameObjBatch):
print("streamId=",trackobj.streamID)
print("surfaceStreamID=",trackobj.surfaceStreamID)
for pastframeobj in pyds.NvDsPastFrameObjStream.list(trackobj):
print("numobj=",pastframeobj.numObj)
print("uniqueId=",pastframeobj.uniqueId)
print("classId=",pastframeobj.classId)
print("objLabel=",pastframeobj.objLabel)
for objlist in pyds.NvDsPastFrameObjList.list(pastframeobj):
print('frameNum:', objlist.frameNum)
print('tBbox.left:', objlist.tBbox.left)
print('tBbox.width:', objlist.tBbox.width)
print('tBbox.top:', objlist.tBbox.top)
print('tBbox.right:', objlist.tBbox.height)
print('confidence:', objlist.confidence)
print('age:', objlist.age)
I already enable it and ran a sample .h264 file which have cars and people in every frame.
First, I do not know if it is normal the majority do not print all parameters.
Second, I dont know why the values just corresponds to just a object and not all objects identified in the same frame according to the attributed unique ID.