Type object 'pyds.NvDsFaceObject' has no attribute 'cast'

How to make casting for NvDsFaceObject because I could not use it

 pyds.NvDsFaceObject.cast(data)

• Hardware Platform: NX
• DeepStream Version: 5.0.1
• JetPack Version: 4.5

Hey, what’s the issue? Also could you share your code with us ?

When I call
pyds.NvDsFaceObject.cast(data)

It give me this error. I read the doc and found out that there is no cast property for NvDsFaceObject

I need to do casting for generate_face_meta like in generate_person_meta on deepstream_test4

Oh, could you use DS 5.1 and try if the error persist?

I tried and same error

Any help?

Hey, customer
Sorry for the delay, could you share me a detailed repro steps for your issue, maybe you can change the deepstream python samples and share it with me.

There are tow functions on test4 that generate metadata person and vehicle

def generate_person_meta(data):
    obj = pyds.NvDsPersonObject.cast(data)
    obj.age = 45
    obj.cap = "none"
    obj.hair = "black"
    obj.gender = "male"
    obj.apparel= "formal"
    return obj

def generate_vehicle_meta(data):
    obj = pyds.NvDsVehicleObject.cast(data);
    obj.type ="sedan"
    obj.color="blue"
    obj.make ="Bugatti"
    obj.model = "M"
    obj.license ="XX1234"
    obj.region ="CA"
    return obj

I want to generate face meta, so I created function same on both person and vehicle

def generate_face_meta(data, predicted_name):
	obj = pyds.NvDsFaceObject.cast(data)
	obj.name = predicted_name
    return obj

I found on deepstream doc that pyds has function pyds.NvDsFaceObject(). I tried to use it but it give me that doesn’t have attribute cast.
https://docs.nvidia.com/metropolis/deepstream/5.0DP/python-api/NvDsMeta_Schema/NvDsFaceObject.html

Hey, would you mind to share your modified test4 file with us or the diff file compared with the original test4 file, so we can save our time to fix the issue.

Sorry for late
https://github.com/xya22er/deepstream_test4.git

Any help? @bcao

Hey customer, it should be an issue for current python bindings, we will check if any WAR and update you ASAP.

I am waiting

Hey, we confirm it’s a issue for python bindings and we will fix it on next release

When?

We don’t have an exact date, please wait for the official annoucement

1 Like

I’m still having this issue with DeepStream 5.1

Please wait for the official announcement for the next release.