The process will stuck;
More precisely in the script remove_anything_video.py line 378 get_clicked_point()
and it is a function from utils.py in line 58
After some testing, it is the problem in lines 60 to 61
cv2.namedWindow("image")
cv2.imshow("image", img)
Seems the whole program will stuck in this line.
However I have tested the cv2.imshow function separately, and it works.
So I wonder if anyone has an explanation for it?
Another guess is that it cannot read the image from /tmp/. (I tested it read the image from the tmp of Ubuntu system )
So I changed to use the default --coords_type key_in
This time it runs to almost the end, but it comes back with an error in the final stage of storing I think?
With this :
Inpainting ... Traceback (most recent call last): File "/home/clark/Projects/Inpaint-Anything-main/remove_anything_video.py", line 393, in <module> iio.mimwrite(video_rm_w_mask_p, all_frame_rm_w_mask, fps=fps) File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/v2.py", line 495, in mimwrite return file.write(ims, is_batch=True, **kwargs) File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/plugins/pyav.py", line 626, in write if any(f.shape != ndimage[0].shape for f in ndimage): File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/plugins/pyav.py", line 626, in <genexpr> if any(f.shape != ndimage[0].shape for f in ndimage): File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/PIL/Image.py", line 528, in __getattr__ raise AttributeError(name) AttributeError: shape. Did you mean: 'save'?
I think it is a dependence problem. But I am not sure, didn't find anything similar in the issues section...
Hope somebody can help...
This looks like the same error I had due to dependency issues. When I followed the installation steps in the readme (in the correct section), it worked fine. I had python version 3.10
Hi, new here.
I followed the instructions and downloaded all the necessary stuff. OS: Ubuntu 2204 Environment: python 3.10 And when I use the command as follows:
The process will stuck; More precisely in the script remove_anything_video.py line 378 get_clicked_point() and it is a function from utils.py in line 58
After some testing, it is the problem in lines 60 to 61
cv2.namedWindow("image")
cv2.imshow("image", img)
Seems the whole program will stuck in this line. However I have tested the cv2.imshow function separately, and it works. So I wonder if anyone has an explanation for it? Another guess is that it cannot read the image from /tmp/. (I tested it read the image from the tmp of Ubuntu system )So I changed to use the default --coords_type key_in This time it runs to almost the end, but it comes back with an error in the final stage of storing I think? With this :
Inpainting ... Traceback (most recent call last): File "/home/clark/Projects/Inpaint-Anything-main/remove_anything_video.py", line 393, in <module> iio.mimwrite(video_rm_w_mask_p, all_frame_rm_w_mask, fps=fps) File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/v2.py", line 495, in mimwrite return file.write(ims, is_batch=True, **kwargs) File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/plugins/pyav.py", line 626, in write if any(f.shape != ndimage[0].shape for f in ndimage): File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/imageio/plugins/pyav.py", line 626, in <genexpr> if any(f.shape != ndimage[0].shape for f in ndimage): File "/home/clark/anaconda3/envs/FinRL/lib/python3.10/site-packages/PIL/Image.py", line 528, in __getattr__ raise AttributeError(name) AttributeError: shape. Did you mean: 'save'?
I think it is a dependence problem. But I am not sure, didn't find anything similar in the issues section... Hope somebody can help...