8000 GitHub - takecx/TitanCraft: Generate titan from single image.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

takecx/TitanCraft

Repository files navigation

TitanCraft

Open In Colab

Generate titan from single image into your Minecraft World!!

Attack of Titan

その日 人類は思い出した
ヤツらに支配されていた恐怖を…
鳥籠の中に囚われていた屈辱を…

back of titan

titans

How to Use

1. Clone this repo

$ git clone https://github.com/takecx/TitanCraft.git
$ cd TitanCraft

2. Restore submodule

$ git submodule update -i
$ cd remove_bg
$ git submodule update -i
$ cd ..

3. Download FBA_Matting model

Download FBA_Matting model from here and place it to ./remove_bg/FBA_Matting/FBA.pth.

4. Download PIFu model

Download PIFu two models from here and here and place there to ./PIFu/checkpoints/.

4. Create Environment

You should create python environment using requirements.txt.

$ conda create -n TitanCraft python=3.7
$ conda activate TitanCraft
$ pip install -r requirements.txt

5. Prepare input image file

Put input image file to ./data/ dir for example.

6. Run script

Run TitanGenerator.py with some arguments.

$ python TitanGenerator.py (input image) --resize (resize) --kernel_size (morphology kernel size) --iteration (morphology iteration num) --output_dir (output dir) --h_max (height max value) --w_max (width max value)

Arguments

  1. input image file path (required)
  2. '--resize' : preprocessed image size (optional)
  3. --kernel_size : kernel size of morphology conversion (optional)
  4. --iteration : iteration num of morphology conversion (optional)
  5. --output_dir : Output dir of generated .schematic file (optional)
  6. --h_max : max height of converted schematic (optional)
  7. --w_max : max width(length) of converted schematic (optional)

For example,

  • input image file path : ./data/sample.png
  • --resize : 256
  • --kernel_size : 5
  • --iteration : 3
  • --output_dir : ./output/
  • --h_max : 100
  • --w_max : 150

then, you run

$ python TitanGenerator.py ./data/sample.png --resize 256 --kernel_size 5 --iteration 3 --output_dir ./output/ --h_max 100 --w_max 150

7. Import .schematic to your Minecraft World!!

Import generated .schematic file (saved in ./output/) to your own Minecraft World using WorldEdit mod.

About

Generate titan from single image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0