↓폴밍끼 유튜브 채널 자세히보기

Python library & package/pip 4

[해결방법] libpng warning: iCCP: known incorrect sRGB profile

libpng warning: iCCP: known incorrect sRGB profile 가 콘솔 창에 계속 뜨면서 굉장히 깔끔하지 않은 상황이 발생하는데 이건 해당 데이터셋의 이미지를 전부 opencv로 읽어오고(imread), 그걸 다시 저장해서(imwrite) 해결할 수 있다. 그 저장된 이미지 데이터셋에 대해 다시 진행하면 위와 같은 상황은 발생하지 않는다. 핵심은 cv2.imread()와 cv2.imwrite()하는 것 뿐이다. 다만 파일의 전체 이미지 파일에 대해 전부 진행해야하니 glob를 사용해서 이미지 파일 이름 리스트를 만들고 진행하면 편하다. 아래는 코드 전문. from glob import glob import cv2 print(cv2.__version__) def getImgNa..

[해결방법] AttributeError: module 'hydra' has no attribute 'main'

hydra는 pip install hydra 하면 안된다고 한다.. 그렇게 추측해서 설치하지 말라고 함 ㅋㅋㅎㅎ 하지만 나는 그렇게 했었고 아래처럼 한 후 해결하였다. pip install hydra-core --upgrade 참고 https://github.com/facebookresearch/hydra/issues/919 [Bug] AttributeError: module 'hydra' has no attribute 'main' · Issue #919 · facebookresearch/hydra 🐛 Bug Description AttributeError: module 'hydra' has no attribute 'main' Checklist I checked on the latest version o..

[해결방법] TypeError: cannot create weak reference to 'weakcallableproxy' object

stackoverflow에서 한 답변이 pytorch-lightning pip 패키지를 1.9.0에서 1.8.6으로 다운그레이드해서 해결했다고 한다. 확인해보니 pytorch-lightning 버전이 1.9.3이었고 1.8.6으로 다운그레이드 해주어서 해결했다. pip install pytorch-lightning==1.8.6 참고 https://stackoverflow.com/questions/75356395/cannot-create-weak-reference-to-weakcallableproxy-object-in-pytorch-module Cannot create weak reference to 'Weakcallableproxy' object in Pytorch Module When i run my ..