gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.41k stars 2.53k forks source link

Can model3D show the camera pose in every frame? #6145

Closed A-pril closed 10 months ago

A-pril commented 11 months ago

Hello~Great work! But our model just need use the camera's pose as input, so how can I get the real-time camera pose please? If there were this feature, I'll be grateful. Thanks a lot!

abidlabs commented 11 months ago

Hi @A-pril can you elaborate on what you mean in a little more detail?

A-pril commented 11 months ago

Hi @A-pril can you elaborate on what you mean in a little more detail?

Thanks for your reply! I just use the model3D component to load my glb file and we can use this component to drag pr rotate our model, right? And I hope I can get the angle of rotation, I guess maybe it's controlled by the camera_position? So how can I get the real-time camera_position? Could you provide any interface?

freddyaboulton commented 11 months ago

Tagging @hannahblair and @dawoodkhan82 the resident model3d experts

dawoodkhan82 commented 11 months ago

@A-pril The model3D component does not currently return the camera position (it only allows you to set the initial camera position). Although this might be something we can consider adding in the future!

You can however create a model3D custom component and add this functionality to your component. Follow our guide for creating a custom component here.

abidlabs commented 10 months ago

I'll go ahead and close this issue since we are not planning to include this in the core Gradio library. But happy to help if you are interested in making this a custom Gradio component (feel free to ask questions in this issue).