Skip to content

KAIST-VML/KOCCA-Text2Mesh

Repository files navigation

FastAPI 활용법

이미지 기반 3D 객체 생성 기술을 위한 FastAPI 서버 및 클라이언트 활용 가이드


📌 개요

이 저장소는 FastAPI를 활용하여 텍스트 기반 프롬프트로부터 3D 객체를 생성하고, 클라이언트를 통해 이를 실행할 수 있는 환경을 제공합니다.
본 프로젝트는 KOCCA 가상공간 과제 2차년도 연구의 일환으로 진행되었습니다.


📂 구성

  • Server: FastAPI 기반 서버 실행 코드
  • Client: 프롬프트 입력 및 객체 생성 요청 클라이언트 코드
  • Dependencies: 서버 및 클라이언트 실행에 필요한 패키지

⚙️ Dependencies (Server)

pip install -r requirements.txt
pip install -e .
# for texture
cd hy3dgen/texgen/custom_rasterizer
python3 setup.py install
cd ../../..
cd hy3dgen/texgen/differentiable_renderer
python3 setup.py install

참고: Tencent-Hunyuan/Hunyuan3D-2


🧪 테스트 객체 생성

python run.py prompt='fancy table'

🚀 서버 실행 (FastAPI)

uvicorn server:app --host 0.0.0.0 --port 8000

⚙️ Dependencies (Client)

pip install fastapi uvicorn requests python-multipart argparse

🔄 포트 포워딩

ssh -L {server_port}:localhost:{client_port} -p {forward_port} {server_user_id}@{server_ip_address}

예시:

ssh -L 8888:localhost:8000 -p 2222 [email protected]

💻 클라이언트 실행

python client.py {input_prompt} {save_dir}

예시:

python client.py "barbie-style chairs and tables" ./output/barbie.glb

📎 참고 자료


🕒 업데이트

  • 작성일: 2025년 6월 26일 오후 7:09

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published