1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

1枚の画像から3Dシーンを生成するSHARPやーる(macOS、Python3.13)

Posted at

はじめに

1枚の画像から3Dシーンを生成するSHARPをやっていきます

開発環境

  • MacBook Air M1, 2020
  • Python 3.13

フォルダ構成

ml-sharp/
├── ACKNOWLEDGEMENTS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── LICENSE_MODEL
├── README.md
├── pyproject.toml
├── requirements.in
├── requirements.txt
│
├── data/
│   └── teaser.jpg
│
├── input/
│   └── images/
│       └── gachimoto3.jpg
│
├── output/
│   └── gaussians/
│       └── gachimoto3.ply
│
└── src/
    └── sharp/
        ├── __init__.py
        ├── __pycache__/
        │
        ├── cli/
        │   ├── __init__.py
        │   ├── __pycache__/
        │   ├── predict.py
        │   └── render.py
        │
        ├── models/
        │   ├── __init__.py
        │   ├── __pycache__/
        │   ├── alignment.py
        │   ├── blocks.py
        │   ├── composer.py
        │   ├── gaussian_decoder.py
        │   ├── heads.py
        │   ├── initializer.py
        │   ├── monodepth.py
        │   ├── normalizers.py
        │   ├── params.py
        │   ├── predictor.py
        │   │
        │   ├── decoders/
        │   │   ├── __init__.py
        │   │   ├── __pycache__/
        │   │   ├── base_decoder.py
        │   │   ├── monodepth_decoder.py
        │   │   ├── multires_conv_decoder.py
        │   │   └── unet_decoder.py
        │   │
        │   ├── encoders/
        │   │   ├── __init__.py
        │   │   ├── __pycache__/
        │   │   ├── base_encoder.py
        │   │   ├── monodepth_encoder.py
        │   │   ├── spn_encoder.py
        │   │   ├── unet_encoder.py
        │   │   └── vit_encoder.py
        │   │
        │   └── presets/
        │       ├── __init__.py
        │       ├── __pycache__/
        │       ├── monodepth.py
        │       └── vit.py
        │
        └── utils/
            ├── __init__.py
            ├── __pycache__/
            ├── camera.py
            ├── color_space.py
            ├── gaussians.py
            ├── gsplat.py
            ├── io.py
            ├── linalg.py
            ├── logging.py
            ├── math.py
            ├── module_surgery.py
            ├── robust.py
            ├── training.py
            └── vis.py

導入

リポジトリをクローンし、ライブラリをインストールします。

git clone https://github.com/apple/ml-sharp.git
cd ml-sharp
pip install -r requirements.txt

input/imagesフォルダに画像を配置します。

20251222-151803-8a5c816d.png

次のコマンドを実行し、3Dシーンを生成します。

sharp predict -i input/images -o output/gaussians

SPZビューワーで生成された.plyを表示してみましょう。

お疲れ様でした。

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?