In this video, I'll demonstrate how to use TripoSR, an open-source AI model, to convert 2D images into 3D models and print them using a 3D printer. The TripoSR model is installed directly on my computer, but if you need installation instructions, please refer to the GitHub page linked below for a step-by-step guide:
https://github.com/VAST-AI-Research/TripoSR
https://github.com/wjakob/instant-meshes
00:00 - Introduction
01:16 - Choosing the Right Images
03:08 - Converting Images to 3D Models in TripoSR
11:05 - Applying Retopology with Instant Mesh
13:37 - Saving OBJ Files as STL
17:50 - Slicing the STL Files in Bambu Studio
25:59 - Print Timelapse & Commentary
27:35 - Outro
_________________________________________________________________________________________________
STEP BY STEP INSTRUCTIONS TO INSTALL TRIPOSR ON WINDOWS 11
Global Dependencies
Before starting, ensure the following global dependencies are installed on your system:
• Python
• Visual Studio Build Tools
• Rust & Cargo
Download Links:
• Python: https://www.python.org/downloads/
• Visual Studio Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/
• Rust & Cargo: https://rustup.rs
Steps:
1. Install Python
◦ Download Python 3.8 or higher from the Python Downloads page.
◦ During installation, check the box labeled "Add Python to PATH".
◦ Verify installation by opening Command Prompt and typing:
python --version
2. Install Visual Studio Build Tools
◦ Visit the Visual Studio Build Tools page.
◦ Install components for C++ development, such as:
▪ "Desktop development with C++"
▪ "C++ build tools"
3. Install Rust & Cargo
◦ Download the Rust installer from rustup.rs and run rustup-init.exe.
◦ Follow the on-screen instructions, choosing the default installation.
◦ Verify installation by typing:
rustc --version
cargo --version
4. Remove CUDA References. This is necessary since we're doing a CPU-only install. These references will need to be restored after the installation.
◦ Go to "Edit System Environment Variables" in Windows.
◦ Remove any CUDA-related variables from the Environment Variables. Save these to Notepad for later restoration.
5. Create a Project Folder
◦ Example: C:/TripoSR
6. Open Command Line Interface (CLI). You can open this by putting CMD in the search field. You’ll see the Command Prompt option. Click on it to open up Command Prompt. Once open navigate to the project folder you created with the following command:
cd C:/TripoSR
7. Clone the TripoSR Repository
git clone https://github.com/VAST-AI-Research/TripoSR.git
8. Set Up a Virtual Environment
python -m venv venv
9. Activate the Virtual Environment
venv\Scripts\activate
10. Install PyTorch (CPU Only)
Visit PyTorch ( https://pytorch.org/get-started/locally/) to choose your platform-specific installation. In this guide I’m assuming a CPU only installation so you can use the code below...
◦ Install PyTorch:
pip install torch torchvision torchaudio
11. Upgrade pip and setuptools
python.exe -m pip install --upgrade pip
pip install --upgrade setuptools
12. Install Other Dependencies by navigating to the TripoSR folder:
cd C:/TripoSRdemo/TripoSR
pip install -r requirements.txt
13. Run the Gradio Interface
python gradio_app.py
14. Resolve ONNX Runtime Error (should you get this error) by Installing ONNX Runtime (CPU Only):
pip install onnxruntime
pip show onnxruntime
15. Rerun the Gradio Interface
python gradio_app.py
16. Address Gradio Version Warning by uninstalling the current version of Gradio and updating:
pip uninstall gradio
pip install --upgrade gradio
17. Verify Functionality by opening the local address displayed in the CLI:
http://127.0.0.
1:7860
18. Test and Enjoy. Confirm the interface is running and functional. Congratulations, you're successfully installed TripoSR
19. I created a batch file to automatically run TripoSR. Save the batch file in the C:/TripoSR folder. For this example, I’m assuming you’ve set up the project in C:/TripoSR. If your project is in a different folder, you’ll need to adjust the code accordingly.
To create the file, use a text editor like Notepad++ (https://notepad-plus-plus.org/). Name the file something like run_triposr.bat.
Make sure the file has the .bat extension, as this is mandatory.
Here’s the batch code:
@echo off
cd C:\TripoSR
call venv\Scripts\activate
cd C:\TripoSR\TripoSR
start cmd /k python gradio_app.py
REM Wait for the server to be available using the Python script
python wait_for_server.py
REM Launch Chrome after server is ready
start chrome http://127.0.0.
1:7860
pause