{"id":20685433,"url":"https://github.com/yas-sim/pseudo-stereo-picture","last_synced_at":"2025-04-22T13:40:38.953Z","repository":{"id":185235205,"uuid":"263666334","full_name":"yas-sim/pseudo-stereo-picture","owner":"yas-sim","description":"Deep learning based pseudo stereo image generation demo using Intel(r) Distribution of OpenVINO(tm) toolkit","archived":false,"fork":false,"pushed_at":"2020-05-30T03:29:18.000Z","size":907,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T15:34:51.659Z","etag":null,"topics":["deep-learning","demo","depth","depth-estimation","depth-image","depth-maps","image-inpainting","inference","inference-engine","inpainting","intel","openvino","openvino-toolkit","pseudo-3d","pseudo-stereo-pictures","python","stereo-images"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yas-sim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-13T15:15:46.000Z","updated_at":"2021-08-18T11:36:31.000Z","dependencies_parsed_at":"2023-08-01T07:09:27.468Z","dependency_job_id":null,"html_url":"https://github.com/yas-sim/pseudo-stereo-picture","commit_stats":null,"previous_names":["yas-sim/pseudo-stereo-picture"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas-sim%2Fpseudo-stereo-picture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas-sim%2Fpseudo-stereo-picture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas-sim%2Fpseudo-stereo-picture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas-sim%2Fpseudo-stereo-picture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yas-sim","download_url":"https://codeload.github.com/yas-sim/pseudo-stereo-picture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250250242,"owners_count":21399597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","demo","depth","depth-estimation","depth-image","depth-maps","image-inpainting","inference","inference-engine","inpainting","intel","openvino","openvino-toolkit","pseudo-3d","pseudo-stereo-pictures","python","stereo-images"],"created_at":"2024-11-16T22:27:19.568Z","updated_at":"2025-04-22T13:40:38.932Z","avatar_url":"https://github.com/yas-sim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pseudo Stereo Picture Generation Demo\r\nThis program generates a set of pseudo stereo pictures from an input image.using  the [Intel(r) Distribution of OpenVINO(tm) toolkit](https://software.intel.com/en-us/openvino-toolkit).  \r\nThe demo program uses a DL model, `midasnet` to generate a depth map from a picture , shift the pixcels horizontally according to the depth of the pixels, then compensate the lacking pixcels caused by the shifted pixels with an image inpainting DL model `gmcnn`.  \r\nThe demo program generates a side-by-side stereo image to a file `sbs3d.jpg`. You can watch the pseudo 3D (like) image with a 3D viewer.  \r\n\r\nこのデモプログラムは[Intel(r) Distribution of OpenVINO(tm) toolkit](https://software.intel.com/en-us/openvino-toolkit)を使用し、１枚の絵から疑似ステレオ画像を作成するものです。  \r\nプログラムは入力画像から`midasnet` DLモデルを使用して深度マップを作成し、ピクセル深度に従って各ピクセルを横方向にシフトし、ピクセルシフトによりできた欠損部分を`gmcnn`画像修復DLモデルで補うことで、疑似ステレオ画像（っぽい）画像を生成しています。  \r\nプログラムは'`sbs3d.jpg`'というファイルにサイドバイサイド3Dイメージを書き出します。3Dビュワーなどを使用することでステレオ(っぽく見えなくもない）画像を見ることができます。  \r\n\r\n\r\n### Generated Pseudo Stereo Images\r\n![stereo](./resources/pseudo-stereo.gif)\r\n\r\n### Depth Image Generated From the Input Picture (This demo won't display this image)\r\n![depth](./resources/disp.png)\r\n\r\n### Side-by-side Stereo Image Output (`sbs3d.jpg`)\r\n![sbs3d](./resources/sbs3d.jpg)\r\n\r\n### Required DL Models to Run This Demo\r\n\r\nThe demo expects the following models in the Intermediate Representation (IR) format:\r\n\r\n  * `midasnet`\r\n  * `gmcnn-places2-tf`\r\n\r\nYou can download this model from OpenVINO [Open Model Zoo](https://github.com/opencv/open_model_zoo).\r\nIn the `models.lst` is the list of appropriate models for this demo that can be obtained via `Model downloader`.\r\nPlease see more information about `Model downloader` [here](../../../tools/downloader/README.md).\r\n\r\n## How to Run\r\n\r\n\r\n### 0. Prerequisites\r\n- **OpenVINO 2020.2**\r\n  - If you haven't installed it, go to the OpenVINO web page and follow the [*Get Started*](https://software.intel.com/en-us/openvino-toolkit/documentation/get-started) guide to do it.  \r\n\r\n\r\n### 1. Install dependencies  \r\nThe demo depends on:\r\n- `opencv-python`\r\n- `numpy`\r\n\r\nTo install all the required Python modules you can use:\r\n\r\n``` sh\r\n(Linux) pip3 install -r requirements.txt\r\n(Win10) pip install -r requirements.txt\r\n```\r\n\r\n### 2. Download DL models from OMZ\r\nUse `Model Downloader` to download the required models and convert the downloaded model into OpenVINO IR models with `Model Converter`.  \r\nThe source model of the `midasnet` is in PyTorch format. Please make sure you have installed prerequisites for `pytorch_to_onnx.py` converter tool.  \r\n\r\n``` sh\r\n(Linux) \r\n  # Install prerequisites for pytorch_to_onnx.py. This is required only for the 1st time\r\n  python3 -m pip install -r $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/requirements-pytorch.in\r\n  python3 $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/downloader.py --list models.lst\r\n  python3 $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/converter.py --list models.lst\r\n       \r\n(Win10) \r\n  # Install prerequisites for pytorch_to_onnx.py. This is required only for the 1st time\r\n  python3 -m pip install -r \"%INTEL_OPENVINO_DIR%\\deployment_tools\\tools\\model_downloader\\requirements-pytorch.in\"\r\n  python \"%INTEL_OPENVINO_DIR%\\deployment_tools\\tools\\model_downloader\\downloader.py\" --list models.lst\r\n  python \"%INTEL_OPENVINO_DIR%\\deployment_tools\\tools\\model_downloader\\converter.py\" --list models.lst\r\n```\r\n\r\n### 3. Run the demo app\r\n\r\n``` sh\r\n(Linux) python3 pseudo-stereo-picture.py \u003cinput_image_file\u003e\r\n(Win10) python pseudo-stereo-picture.py \u003cinput_image_file\u003e\r\n```\r\n\r\n## Demo Output  \r\nThe application draws the results on the screen.\r\n\r\n## Tested Environment  \r\n- Windows 10 x64 1909 and Ubuntu 18.04 LTS  \r\n- Intel(r) Distribution of OpenVINO(tm) toolkit 2020.2  \r\n- Python 3.6.5 x64  \r\n\r\n## See Also  \r\n* [Using Open Model Zoo demos](../../README.md)  \r\n* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)  \r\n* [Model Downloader](../../../tools/downloader/README.md)  \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyas-sim%2Fpseudo-stereo-picture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyas-sim%2Fpseudo-stereo-picture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyas-sim%2Fpseudo-stereo-picture/lists"}