'분류 전체보기' 카테고리의 글 목록
본문 바로가기

분류 전체보기98

opencv python으로 rtsp 스트리밍 읽기 - method DESCRIBE failed: 401 Unauthorized 에러 해결. 기본이지만, 기록용으로 rtsp 아이디, 비번을 포함해서 읽어오는 방법. rtsp 주소 안에 아이디, 비번을 안넣으면 "method DESCRIBE failed: 401 Unauthorized" 에러 발생. [rtsp @ 0000024df57d9540] method DESCRIBE failed: 401 Unauthorized import cv2 # RTSP stream URL rtsp_url = "rtsp://admin:1234@192.168.100.83:554/StdCh1" #이부분만 수정 # Create a VideoCapture object cap = cv2.VideoCapture(rtsp_url) # Check if the stream is opened successfully if not cap... 2023. 2. 13.
yolov5 centos7 설치 및 training python3 -m venv yolov5 export TORCH_CUDA_ARCH_LIST=8.6 git clone https://github.com/ultralytics/yolov5.git pip3 install -r requirements.txt pip3 uninstall torch pip3 install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html from glob import glob img_list = glob('/home/admin/darknet/Training/SealNumLogo/dataset/*.jpg') print(len(img_list)) from skle.. 2023. 1. 20.
read yolo label txt file and change class code import os files = [] # Add the path of txt folder for i in os.listdir("C:\data"): if i.endswith('.txt'): files.append(i) for item in files: # define an empty list file_data = [] # open file and read the content in a list with open(item, 'r') as myfile: for line in myfile: # remove linebreak which is the last character of the string currentLine = line[:-1] data = currentLine.split(" ") # add item.. 2022. 12. 15.
How to crop image using yolo format annotation(label)? import cv2 import glob from tqdm import tqdm img_files = glob.glob('/home/admin/darknet/*.png') save_dir = '/home/admin/Downloads/cropped_img' for img_file in tqdm(img_files): img = cv2.imread(img_file) dh, dw, _ = img.shape full_path = img_file file_name = full_path.split('/')[-1] txt_file = open((full_path[:-4] + ".txt"), 'r') lines = txt_file.readlines() for line in lines: cls, x_center, y_ce.. 2022. 12. 15.
netcat nc로 리눅스에서 window 윈도우 PC로 폴더/파일 전송하기. 리눅스PC(192.168.0.20)에서 윈도우PC(192.168.0.100)로 outout2라는 폴더를 전송해보겠다. 1. 윈도우PC netcat 설치 cmd창 열고 curl -O https://eternallybored.org/misc/netcat/netcat-win32-1.12.zip zip 풀고 아래 nc.exe 파일을 복사해서 C > Windows > System32 폴더 안에 붙여넣기. 2. 윈도우PC에서 터미널 열기 아래 명령어 치면 Listening 상태. 아무런 반응 없어도 당황하지 않기. nc -l -p 10000 | tar xvf - -C #예시 nc -l -p 10000 | tar xvf - -C Z:\Record\YARIMCA\07. Extracted\netcat_test 3. 리눅.. 2022. 11. 21.