Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv error #31

Open
Mr-Nobody-dey opened this issue Jul 28, 2024 · 1 comment
Open

Opencv error #31

Mr-Nobody-dey opened this issue Jul 28, 2024 · 1 comment

Comments

@Mr-Nobody-dey
Copy link

Any solution to this error?

/usr/local/lib/python3.10/dist-packages/mmcv/init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/mmseg/models/losses/cross_entropy_loss.py:235: UserWarning: Default avg_non_ignore is False, if you would like to ignore the certain label and average loss over non-ignore labels, which is the same with PyTorch official cross_entropy, set avg_non_ignore=True.
warnings.warn(
load checkpoint from local path: /content/drive/MyDrive/colaboratory/extract_and_aligh_frames/SimSwap/SimSwap_datasets_prepare/Code/mmsegmentation/trained_models/segformer-fp-1024.pth
/usr/local/lib/python3.10/dist-packages/mmseg/models/segmentors/base.py:289: UserWarning: show==False and out_file is not specified, only result image will be returned
warnings.warn('show==False and out_file is not specified, only '
Figure(1500x1000)
Traceback (most recent call last):
File "/content/easyportrait/pipelines/./demo/image_demo.py", line 46, in
main()
File "/content/easyportrait/pipelines/./demo/image_demo.py", line 36, in main
show_result_pyplot(
File "/usr/local/lib/python3.10/dist-packages/mmseg/apis/inference.py", line 145, in show_result_pyplot
mmcv.imwrite(img, out_file)
File "/usr/local/lib/python3.10/dist-packages/mmcv/image/io.py", line 319, in imwrite
flag, img_buff = cv2.imencode(img_ext, img, params)
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:1141: error: (-2:Unspecified error) could not find encoder for the specified extension in function 'imencode'

@Thomas-Ver
Copy link

Have you check the type of your file in the show_result_pyplot() ?
Verify that it's a valid formats for opencv like png,jpg,ppm etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants