CV

1. Install CVAT1. 구축 환경OS : Ubuntu도커 설치 필수NVIDIA 드라이버 설치 되어 있어야 함NVIDIA-Container-Toolkit 설치되어 있어야 함2. 설치 방법https://opencv.github.io/cvat/docs/administration/basics/installation/최신 버전으로 설치할 경우 도커를 올리고 접속하면, Cannot connect to the server 문제가 발생하므로, 가능하면 2.2.0 버전으로 설치할 것을 추천함(2024.03 기준 최신 모델로 진행해보니 문제 없었음)Cannot connect to the serverMake sure the CVAT backend and all necessary services (Database, ..
행동 영상을 탐지한 후에, BBOX에 한글을 출력하고자 했다. ChatGPT에게 물어봤더니, opencv-contrib-python을 설치한 후 freetype 으로 하면 된다고 아래와 같이 샘플 코드를 제시해주었다 import cv2 import numpy as np # 이미지를 불러오거나 생성합니다. image = np.zeros((500, 500, 3), dtype=np.uint8) # freetype 모듈을 불러옵니다. ft = cv2.freetype.createFreeType2() # 한글 폰트 파일의 경로를 지정합니다. font_path = 'NanumGothic.ttf' ft.loadFontData(fontFileName=font_path, id=0) # 이미지에 텍스트를 추가합니다. 위치,..
이미지는 array이지만 현실 세계에서는 파일로 저장하고, 파일마다 형식이 다르게 존재하고 있음. 파일 형식에 따라 이미지를 다양한 값의 조합으로 구현함(확장자가 중요한 것은 아님) 제일 중요한 것은, 파일을 불러와서 해석할 수 있어야 함 # tensorflow - GPU import tensorflow as tf im = tf.io.read_file('moon.jpg') t= tf.image.decode_image(im) ss = tf.cast(t, 'float32') ss/127.5 - 1 # -1 ~ 1로 만듦 # Opencv - CPU import cv2 s = cv2.imread('moon.jpg) s.dtype >> dtype('uint8') #강도 python opencv는 numpy 기본으..
Hanna 한나
'CV' 태그의 글 목록