Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D Mesh Generation from DSM Images from Sat-NeRF output #35

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tersite1
Copy link

@tersite1 tersite1 commented Aug 9, 2024

Dear Centre Borelli,

I hope this message finds you well. I'm senior undergraduate student of Yonsei University, Civil & Environmental engineering. First and foremost, thank you for your incredible work on the Sat-NeRF and making it as open-source on GitHub. It has been an invaluable resource for those of us who are interesting in working with geospatial data and 3D modeling.

After using your model to generate DSM images, I found myself in need of a method to convert these DSMs into 3D mesh files that could be easily visualized and used in other applications. To address this need, I developed a script that takes your DSM outputs and converts them into high-quality 3D meshes, outputting the results in both .ply and .obj formats. The script leverages Open3D for point cloud processing, normal estimation, and Poisson surface reconstruction, with the added benefit of GPU acceleration where available.

Given that this script complements your existing work, I thought it might be a useful addition to your repository. I’ve included it in this pull request, along with clear documentation on how to use it.

What I did :

  • Converts DSM images into 3D point clouds.
  • Generates 3D meshes using Poisson surface reconstruction.
  • Exports meshes in .ply and .obj formats.
  • Includes a progress bar for real-time feedback.
  • Optimized for performance with GPU support.
    I believe this functionality could be a valuable extension for users who are looking to further utilize the DSM images generated by your model. I have so much interests about Geospatial data processing and NeRF, so I would be honored if you would consider merging this pull request into your repository.

Please feel free to reach out if you have any questions or need any adjustments. I’m also open to any feedback or suggestions you might have.

Thank you again for your outstanding contributions to the field.

Best regards,
스크린샷 2024-08-09 오후 10 06 12

This is the target image that I used for 3D data creation and outputs are below.

MeshCreated PointCloud Created ObjectCreated

Thank you.

module import error solved
Recently, an issue was encountered during the execution of the training script, specifically a TypeError: 'module' object is not callable. This error was traced back to the metrics.py file within the ssim function. The problem arose because the alias ssim_ for the kornia.losses.ssim function was mistakenly treated as a callable function, leading to the TypeError.

To resolve this issue, the following changes were made:

In the metrics.py file, the import statement from kornia.losses import ssim as ssim_ was replaced with from kornia.losses import ssim as kornia_ssim.
The ssim function definition was updated from return torch.mean(ssim_(image_pred, image_gt, 3)) to return torch.mean(kornia_ssim(image_pred, image_gt, 3)).
These modifications correctly import and utilize the ssim function from the kornia.losses module, resolving the TypeError. With these changes, the training script can now execute without encountering this specific error, ensuring the SSIM calculation is handled correctly and allowing for smoother execution and accurate performance metrics.

To incorporate this fix, update the import statement and the ssim function definition in the metrics.py file as described above. Re-running the training script after these modifications will ensure proper functionality.
Creating ply file using DSM image map
Python script that converts Digital Surface Model (DSM) data into high-quality 3D mesh files. Utilizing the Open3D library and the power of NVIDIA A100 GPUs, the script efficiently processes DSM images to produce .ply and .obj files, suitable for 3D visualization and further processing
Python script that converts Digital Surface Model (DSM) data into high-quality 3D mesh files. Utilizing the Open3D library and the power of NVIDIA A100 GPUs, the script efficiently processes DSM images to produce .ply and .obj files, suitable for 3D visualization and further processing.
@tersite1
Copy link
Author

tersite1 commented Aug 9, 2024

https://github.com/tersite1/DSMtoPLY

This is the Project page for more explanation. And I added height parameter for better 3D creation.

sample
HeightSample

@tersite1
Copy link
Author

tersite1 commented Aug 9, 2024

스크린샷 2024-08-09 오후 10 49 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant