vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.9k stars 1.11k forks source link

i am unable to execute " python main.py --config argument.yml " #133

Open momer1986 opened 3 years ago

momer1986 commented 3 years ago

Following are the details

(3DP) C:\Users\H\Downloads\3d-photo-inpainting-master>python main.py --config argument.yml running on device 0 0%| | 0/1 [00:00<?, ?it/s]Current Source ==> moon Running depth extraction at 1629900599.5861018 'cp' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "main.py", line 54, in run_boostmonodepth(sample['ref_img_fi'], config['src_folder'], config['depth_folder']) File "C:\Users\H\Downloads\3d-photo-inpainting-master\boostmonodepth_utils.py", line 41, in run_boostmonodepth depth = imageio.imread(os.path.join(BOOST_BASE, BOOST_OUTPUTS, tgt_name)) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\functions.py", line 265, in imread reader = read(uri, format, "i", kwargs) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\functions.py", line 172, in get_reader request = Request(uri, "r" + mode, kwargs) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 124, in init self._parse_uri(uri) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 260, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: 'C:\Users\H\Downloads\3d-photo-inpainting-master\BoostingMonocularDepth\outputs\moon.png'

VjayalakshmiK commented 3 years ago

The source of the error lies in the fact that the inputs folder inside BoostingMonocularDepth folder is empty; the cp command is actually supposed to copy the input image from the input folder in the main directory to the input folder inside BoostingMonocularDepth. For now, you can manually copy your image into the necessary folder, but what you actually need to figure out is why the cp command isnt working for you.

My guess is: Because you are using a windows system, acc to this answer https://stackoverflow.com/questions/14797136/cp-is-not-recognized-as-an-internal-or-external-command , cp isnt recognized and should be replaced with copy instead.

Good luck!

bycloudai commented 2 years ago

Give this repo I wrote modified for Windows instead: https://github.com/bycloudai/3d-photo-inpainting-Windows

sshahriyari commented 1 year ago

I have same issue in windows.

running on device 0 0%| | 0/1 [00:00<?, ?it/s]Current Source ==> 11007899444_04a328d686_k Running depth extraction at 1662196686.824487 The system cannot find the path specified. 0 file(s) copied. python: can't open file 'run.py': [Errno 2] No such file or directory 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "main.py", line 54, in run_boostmonodepth(sample['ref_img_fi'], config['src_folder'], config['depth_folder']) File "C:\temp\3dp\3d-photo-inpainting\boostmonodepth_utils.py", line 41, in run_boostmonodepth depth = imageio.imread(os.path.join(BOOST_BASE, BOOST_OUTPUTS, tgt_name)) File "C:\Users\Saeed\MiniConda3\envs\3DP\lib\site-packages\imageio__init__.py", line 97, in imread return imread_v2(uri, format=format, kwargs) File "C:\Users\Saeed\MiniConda3\envs\3DP\lib\site-packages\imageio\v2.py", line 200, in imread with imopen(uri, "ri", imopen_args) as file: File "C:\Users\Saeed\MiniConda3\envs\3DP\lib\site-packages\imageio\core\imopen.py", line 118, in imopen request = Request(uri, io_mode, format_hint=format_hint, extension=extension) File "C:\Users\Saeed\MiniConda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 248, in init self._parse_uri(uri) File "C:\Users\Saeed\MiniConda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 407, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: 'C:\temp\3dp\3d-photo-inpainting\BoostingMonocularDepth\outputs\11007899444_04a328d686_k.png'

buddylee7 commented 1 year ago

ditto

swiftDoer commented 1 year ago

I get the same at google colab

ile "main.py", line 54, in run_boostmonodepth(sample['ref_img_fi'], config['src_folder'], config['depth_folder']) File "/content/3d-photo-inpainting/boostmonodepth_utils.py", line 41, in run_boostmonodepth depth = imageio.imread(os.path.join(BOOST_BASE, BOOST_OUTPUTS, tgt_name)) File "/usr/local/lib/python3.8/dist-packages/imageio/core/functions.py", line 265, in imread reader = read(uri, format, "i", kwargs) File "/usr/local/lib/python3.8/dist-packages/imageio/core/functions.py", line 172, in get_reader request = Request(uri, "r" + mode, kwargs) File "/usr/local/lib/python3.8/dist-packages/imageio/core/request.py", line 124, in init self._parse_uri(uri) File "/usr/local/lib/python3.8/dist-packages/imageio/core/request.py", line 260, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: '/content/3d-photo-inpainting/BoostingMonocularDepth/outputs/imagename.png'

swiftDoer commented 1 year ago

Okay nvm had to do with the naming. No spacebars allowed.

But now I get this... cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/resize.cpp:3688: error: (-215:Assertion failed) !dsize.empty() in function 'resize'

bySnach commented 1 year ago

Hello @bycloudai, I have the same issue with the following:

raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: 'C:\Users\User\3d-photo-inpainting\BoostingMonocularDepth\outputs\image.png'

I did everything according to your guide provided here: https://github.com/bycloudai/3d-photo-inpainting-Windows

For some reason, it tries to find the image in the BoostingMonocularDepth\outputs\ folder, but I've already tried to manually copy it to this folder, - it still not working.

Could you please help me figure out what is causing this and how to fix it?

Thank you in advance.