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
32.49k stars 2.44k forks source link

Model3D right-handed coordinate system #8376

Closed dylanebert closed 4 months ago

dylanebert commented 4 months ago

Description

Revise Canvas3D viewer to use a right-handed coordinate system, leading to fewer confusing or unexpected results for researchers.

Closes: #8375

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

gradio-pr-bot commented 4 months ago

🪼 branch checks and previews

• Name Status URL
Spaces ready! Spaces preview
Website building...
Storybook ready! Storybook preview
:unicorn: Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/df42945d8644d7c0ca1ed612cb1617242705df0e/gradio-4.31.5-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@df42945d8644d7c0ca1ed612cb1617242705df0e#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-builds.s3.amazonaws.com/df42945d8644d7c0ca1ed612cb1617242705df0e/gradio-client-0.19.4.tgz
gradio-pr-bot commented 4 months ago

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/model3d patch
gradio patch

With the following changelog entry.

Model3D right-handed coordinate system

Maintainers or the PR author can modify the PR title to modify this entry.

#### Something isn't right? - Maintainers can change the version label to modify the version bump. - If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can [update the changelog file directly](https://github.com/dylanebert/gradio/edit/model3d-righthanded/.changeset/chubby-rings-beg.md).
dylanebert commented 4 months ago

For more context, this isn't a bug, but many researchers perceive it as a bug, such as in InstantMesh.

Another option is to allow changing the coordinate system in the viewer, but this may also be confusing. For simplicity, a right-handed coordinate system should lead to the least confusion for users :)

EmVSW5AW8AAoDD9

Some additional context here: forum

dawoodkhan82 commented 4 months ago

@dylanebert

Quick question about InstantMesh:

Note: Downloaded .obj model will be flipped. Export .glb instead or manually flip it before usage.

Will this PR fix this issue in their space? Why does it affect the obj and glb files differently if so?