일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- C++
- Linux
- mysql
- pytorch
- ubuntu
- Numpy
- 핑거스타일
- Visual Studio
- 컨테이너
- Docker
- windows forms
- label
- JSON
- SSH
- Selenium
- YOLO
- pandas
- paramiko
- C
- LIST
- 기타 연주
- Python
- 프로그래머스
- 오류
- VS Code
- pip
- error
- OpenCV
- C#
- 채보
- Today
- Total
목록분류 전체보기 (322)
기계는 거짓말하지 않는다
classid, x center, y center, width, height 형식의 YOLO label 텍스트 파일의 class 별 object 개수를 확인하는 경우 import os import glob import datetime import time import copy # YOLO dataset 구조 형식일 경우 dir_root_path = "D:/Datasets/yolo_split_dataset/labels/" sub_dir_name_list = ["train", "val"] name_dict = {} read_count = 0 start_time = time.time() for sub_dir_name in sub_dir_name_list: label_path_list = glob.glob(os..
classid, x center, y center, width, height 형식의 YOLO label 텍스트 파일의 특정 classid를 제외해야 하는 경우 import os import glob import datetime import time # YOLO dataset 구조 형식일 경우 dir_root_path = "D:/Datasets/yolo_split_dataset/labels/" sub_dir_name_list = ["train", "val"] # 제외할 classid skip_classid_list = ["2", "5", "9"] start_time = time.time() for sub_dir_name in sub_dir_name_list: label_path_list = glob.glo..
classid, x center, y center, width, height 형식의 YOLO label 텍스트 파일 classid를 변경해야 하는 경우 import os import glob import datetime import time # YOLO dataset 구조 형식일 경우 dir_root_path = "D:/Datasets/yolo_split_dataset/labels/" sub_dir_name_list = ["train", "val"] # 1 -> 0, 2 -> 1, 3 -> 2 CHANGE_ID_TABLE = { "1" : "0", "2" : "1", "3" : "2" } start_time = time.time() for sub_dir_name in sub_dir_name_list: l..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/caAnyu/btrN6mVoAIa/2imW0fZahveNoZ6KkijnFk/img.png)
프로그래머스 - 다음 큰 숫자 문제입니다. 주어진 자연수를 2진수로 변환했을 때, 1의 개수가 같고 주어진 자연수 보다 큰 숫자를 찾으면 됩니다. 주어진 자연수 보다 1 더 큰 숫자 부터 확인을 시작하고, 비트 연산자로 1을 왼쪽으로 밀면서 AND 연산하여 2진수 1의 개수를 확인합니다. #include #include using namespace std; int solution(int n) { int answer = n;// 주어진 자연수 보다 1 더 큰 숫자로 시작해야 함 int i, n_cnt = 0, bit_check = 1, check_cnt = 0; while(bit_check
YOLO txt 형식 label 데이터를 라벨링 툴인 Labelme에서 읽을 수 있는 JSON 형식으로 바꿔 준다. 이미지와 txt 라벨이 같은 디렉터리에 있을 경우 그대로 사용 가능하다. 다른 디렉터리일 경우 코드 수정이 필요하다. import os import glob import json import time import datetime import shutil import cv2 def calculate_points(image_width: int, image_height: int, x_center_scaling: float, y_center_scaling:float, w_scaling:float, h_scaling:float): w = w_scaling * image_width h = h_scal..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/rZhZ0/btrNvrjc0fW/E4TkiMSCAGpsw5L081sOA1/img.png)
git add 후 이러한 오류를 보는 경우가 있다. hint에 주어진 명령어 대로 처리해서 되는 경우도 있지만 안될 수 있다. 원인은 git add 에 포함된 다른 하위 디렉터리에 .git 폴더가 또 있는 경우이다. 다른 하위 디렉터리의 .git 폴더를 제거 후 명령어를 다시 실행한다.
센과 치히로의 행방불명 - 언제나 몇 번이라도(Always with me) 기타 핑거스타일 연주 곡입니다. YouTube Link: 언제나 몇 번이라도 위 곡에 맞추어 있는 악보를 조금 편곡하여 연주했습니다. 전체 연주
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/rTmsu/btrMrRXGSd0/zRjCJmjF8vk52MnfxhktJ0/img.png)
리스트의 선언, 할당 과정을 간단하게 한 줄로 처리할 수 있다. 리스트 내포의 간단한 사용 예시이다. # 순차 할당 temp_list = [i for i in range(10)] print(temp_list, "\n", "-" * 40) # 2중 반복 temp_list = [j for i in range(3) for j in range(5)] print(temp_list, "\n", "-" * 40) # 조건문 temp_list = [i for i in range(10) if i > 5 or i < 2] print(temp_list, "\n", "-" * 40) # 대입 값 조건문 temp_list = [i if i < 5 else -1 for i in range(10)] print(temp_list, ..