1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

概要

リンゴ屋さんが3DGS系の3D生成モデルをリリースしていたので、ローカルで動かしてみます。
一応、VRAM6GB環境でも動きそうです。

環境

OS:Windows 11
GPU:GeForce RTX 3060 laptop
CPU:i7-10750H
memory:32G

手順

以下のコマンドで、リポジトリをダウンロードします。

git clone https://github.com/apple/ml-sharp
cd ml-sharp

以下のコマンドで、python 3.13の仮想環境を構築できるようにします。

winget install -e --id astral-sh.uv
uv --version
uv python install 3.13

image.png

python 3.13の仮想環境を構築します。

uv venv --python 3.13 .venv

image.png

アクティベイトし、pipをインストールする。

.venv\Scripts\activate
curl -L -o .venv\Scripts\get-pip.py https://bootstrap.pypa.io/get-pip.py
.venv\Scripts\python.exe .venv\Scripts\get-pip.py

image.png

必要なライブラリをインストールする。

.venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
.venv\Scripts\python.exe -m pip install -r requirements.txt
.venv\Scripts\python.exe -m pip uninstall -y torch torchvision torchaudio
.venv\Scripts\python.exe -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

以下のコマンドで、sharpを動くことを確認する。

sharp --help

image.png

フォルダの作成とモデルのダウンロードを実施する。

mkdir input\images
mkdir output\gaussians
mkdir models
curl -L -o models\sharp_2572gikvuh.pt https://ml-site.cdn-apple.com/models/sharp/sharp_2572gikvuh.pt

image.png

ml-sharp\input\images\ に jpg/png/heic などの3Dモデルにする画像を配置します。

image.png

以下のコマンドで、3Dモデルを生成する。

sharp predict -i "input\images" -o "output\gaussians"

スクリーンショット 2025-12-18 002811.png

結果

GPUメモリは12GB(VRAM6GB+共有メモリ6GB)ぐらいで、生成時間は120秒でした。
(ちなみに4090だと20秒です。)

output\gaussiansに.plyファイルが出力されています。

image.png

思ったよりも3Dですね。
そして綺麗。

image.png

image.png

image.png

今回はこのファイルをsparkを使って確認しています。
sparkの構築は大変ですが、以下で確認してください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?