일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- C#
- Numpy
- mysql
- SSH
- Linux
- pip
- C++
- OpenCV
- ubuntu
- 채보
- label
- C
- error
- JSON
- 컨테이너
- Docker
- Selenium
- Visual Studio
- 핑거스타일
- windows forms
- YOLO
- 프로그래머스
- 기타 연주
- VS Code
- 오류
- pytorch
- paramiko
- Python
- pandas
- nvidia-smi
- Today
- Total
목록AI (35)
기계는 거짓말하지 않는다
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..
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..
https://github.com/theAIGuysCode/yolov3_deepsort GitHub - theAIGuysCode/yolov3_deepsort: Object tracking implemented with YOLOv3, Deep Sort and Tensorflow. Object tracking implemented with YOLOv3, Deep Sort and Tensorflow. - GitHub - theAIGuysCode/yolov3_deepsort: Object tracking implemented with YOLOv3, Deep Sort and Tensorflow. github.com YOLOv3 deepSORT 실행 시 다음과 같은 오류가 발생할 수 있다. KeyError: "Th..
xmin, ymin, xmax, ymax 좌표를 YOLO label 형식인 center x, center y, width, height 로 변환한다. 원본 이미지 해상도를 나누어 0~1 사이의 비율로 표현한다. 다른 형식으로 된 원본 좌표도 계산 식을 변경하여 응용 가능하다. def get_object_params(i_width: int, i_height: int, xmin, ymin, xmax, ymax): image_width = 1.0 * i_width image_height = 1.0 * i_height center_x = xmin + 0.5 * (xmax - xmin) cneter_y = ymin + 0.5 * (ymax - ymin) absolute_width = xmax - xmin abso..

입력 신호의 합을 출력 신호로 변환하는 함수를 활성화 함수(Activation Function)라 한다. 임곗값을 경계로 출력 신호가 바뀐다. 신경망에서는 선형 함수일 경우 신경망의 층을 깊게 하는 의미가 없어진다. 미분하였을 때 항상 동일한 gradient가 나오게 된다. 따라서 비선형 함수를 사용한다. Step Function 입력이 0 초과일 경우 1, 그 외 0 import numpy as np import matplotlib.pyplot as plt def step_function(x : np): return (x > 0).astype(np.int64) x = np.arange(-5.0, 5.0, 0.1) y = step_function(x) plt.plot(x, y) plt.plot([0, 0..
선행: 단층 퍼셉트론 단층 퍼셉트론(Single-Layer Perceptron) AND, OR, NAND 단층 퍼셉트론은 값을 보내는 Input Layer와 출력하는 Output Layer 두 단계로 나뉨 활성화 함수가 사용되지 않으며 입출력 레이어 중간에 Hidden Layer가 추가되면 다층 퍼셉트론(Multi-Layer Perceptron)이 된 machine-does-not-lie.tistory.com 퍼셉트론은 층을 쌓아 다층 퍼셉트론(Multi-Layer Perceptron)을 만들 수 있다. 단층 퍼셉트론의 AND, OR, NAND를 이용한 층을 하나 더 쌓아 XOR 표현(비선형)이 가능하다. def XOR_gate(x1, x2): o1 = OR_gate(x1, x2) o2 = NAND_ga..

PyTorch를 이용한 Multiclass ClassificationCustom Datafeature 5개, label 종류 6개로 이루어진 데이터.각 label마다 기본 base 값을 토대로 무작위로 생성 (Total 1200개)import pandas as pddataFrame = pd.read_csv("custom_random_data.csv", delimiter=",");# label 종류 별 feature 표준편차 확인print(dataFrame.groupby("Name").std())표준편차가 큰 F3 feature를 제외한 나머지로 학습을 진행Custom Dataset, Custom Modelclass CustomDataset(Dataset): def __init__(self, data..
이미지 Augmentation을 할 때 사용할 수 있다.Augmentation은 데이터의 양을 늘리기 위해 원본에 각종 변환을 적용하고 데이터를 늘릴 수 있다.동일한 이미지들을 조금씩 변형시켜가며 학습하면서 Overfitting을 방지하는 데 도움이 된다.학습 용도에 맞는 augmentation을 선택해서 사용하여야 한다.보통 Training 단계에서 많이 사용되지만 Test 단계에서도 사용이 가능하며,이를 Test Time-Augmentation(TTA)이라고 함Dataloader를 이용하여 받으면 channel, height, width(c, h, w) shape가 되며img.cpu().numpy().transpose(1, 2, 0).copy()를 이용하면 OpenCV에서 사용할 수 있는 (h, w,..