Deep Learning

annotation tool roLabelImg 설치 (pyqt5)

민토즈 2021. 1. 8. 21:28
300x250

annotation tool 중 사각형 박스를 회전할 수 있는 툴을 찾았고, 기존 labelimg를 기반으로 작성되었습니다. 

 

다운로드 받는 위치 github.com/cgvict/roLabelImg

 

cgvict/roLabelImg

Label Rotated Rect On Images for training. Contribute to cgvict/roLabelImg development by creating an account on GitHub.

github.com

설치 방법이 pyqt4로 되어 있어서, 더 이상 지원하지 않고, pip install로 설치가 되지 않아서 pyqt5로 설치해서 동작 유무를 확인했지만, 다음과 같은 에러가 발생합니다.

 

if os.path.exists(predefClassesFile) is True:
NameError: name ‘codecs’ is not defined

 

구글 검색에서 관련 문제를 해결한 사이트가 있어서 참고해서 roLabelImg.py을 수정 후 동작이 잘되는 것을 확인했습니다.

 

windows 10에서 기본 설치는  

pip install pyqt5-tools

pip install lxml

 

roLabelImg를 다운받거나 clone합니다.

pyrcc5 -o resources.py resources.qrc

python roLabelImg.py

 

실행하면 에러가 발생하는 것을 확인할 수 있습니다.

roLabelImg.py에서 

 

with codecs.open으로 시작하는 부분을 다음과 같이 수정합니다.

with codecs.open(predefClassesFile, "r", encoding="utf-8") as f:

 

python roLabelImg.py를 다시 실행합니다. 

 

300x250