batch generate 3d stereo images from single photo
- outputs:
- inputs:
https://www.pexels.com/photo/action-adventure-alps-conifers-238622/ https://www.pexels.com/photo/alone-animal-bird-clouds-395196/ https://www.pexels.com/photo/woman-in-gray-long-sleeve-top-and-red-pants-sitting-beside-tree-and-white-medium-coated-dog-681833/
install docker, then run:
docker pull jaroslawweber/photo2stereo:base
create folder input and put there jpg files (jpeg not working)
then run
docker run -it -v ${PWD}/input:/workspace/input -v ${PWD}/output:/workspace/output jaroslawweber/photo2stereo:base
for fully automated stereo generation, run:
python generate_stereo_auto.py
for semi-automated stereo generation, generate depth maps first:
python generate_depths.py
and after you fix the depth map (usually few fixes is enough), you can create a stereo with it:
python stereo_from_depth.py
to also output depth maps run this command instead
docker run -it -v ${PWD}/input:/workspace/input -v ${PWD}/output:/workspace/output -v ${PWD}/depths:/workspace/depths jaroslawweber/photo2stereo:base
you can pass custom parameters to script. run:
python
from photo2stereo import batch_create
then run batch_create with your custom parameters
by default, this script generates 3 stereo images with different deviation: 0.2 , 0.56, 1.1
you can use step (number of generated stereo images), min_deviation and max_deviation to tweak those parameters to desire effect
linux:
curl -s http://github.com/jaroslaw-weber/photo2stereo/easy_install.sh | bash
photo2stereo