목록전체 글 (285)
printf("ho_tari\n");
2024.8.26 영상처리(Image Processing)입력 받은 영상을 사용 목적에 맞게 적절하게 처리하여 보다 개선된 영상을 생성하는 것입력 영상에 있는 잡음(noise) 제거, 영상의 대비(contrast) 개선, 관심영역(region of interest) 강조, 영역 분할(segmentation), 압축 및 저장 등저수준 영상 처리(좁은 의미의 영상 처리)영상 획득영상 향상영상 복원변환 처리영상 압축고수준 영상 처리(컴퓨터 비전)영상 분할영상 표현영상 인식 영상 처리의 역사영상 처리의 시작1920년대 초반 런던과 뉴욕 간에 해저 케이블을 통한 신문사들이 사진 전송본격적인 영상 처리 위한 기술1940년대 폰 노이만의 디지털 컴퓨터의 개념 시작1950년 이후 트랜지스터, IC, 마이크로프로세서 같..
2024.8.23 머신러닝 linearregression.pyimport numpy as npimport tensorflow as tffrom tensorflow.keras.models import Sequentialfrom tensorflow.keras.layers import Dense# 데이터 생성np.random.seed(0)X = np.random.rand(100, 1) # 100개의 샘플, 1개의 featurey = 3 * X + 2 + np.random.randn(100, 1) * 0.1 # y = 3x + 2 + 잡음# 모델 정의model = Sequential()model.add(Dense(1, input_dim=1, activation='linear'))# 모델 컴파일model.co..
2024.8.22 선형회귀 초기선언 경사하강법 사용 학습 자동 미분 행렬 연산으로 구하기 Zero Grad사용 이유 모델 정의 및 학습 Class 사용파이토치에서는 대부분 클래스를 이용해서 모델을 구현한다. 모델 학습 import torchimport numpy as nptorch.manual_seed(777) # for reproducibility# Load the dataxy = np.loadtxt('/content/drive/MyDrive/data-04-zoo.csv', delimiter=',', dtype=np.float32)x_data = xy[:, 0:-1]y_data = xy[:, [-1]]print(x_data.shape, y_data.shape)nb_classes = 7 # 0 ~ ..
2024.8.21 Softmax# Lab 6 Softmax Classifierimport torchfrom torch.autograd import Variabletorch.manual_seed(777) # for reproducibilityx_data = [[1, 2, 1, 1], [2, 1, 3, 2], [3, 1, 3, 4], [4, 1, 5, 5], [1, 7, 5, 5], [1, 2, 5, 6], [1, 6, 6, 6], [1, 7, 7, 7]]y_data = [[0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 1, 0], [0, 1, 0], [0, 1, 0], [1, 0, 0], [1, 0, 0]]X = Variable(torch.Tensor(x..
2024.8.20 Logistic Regression Binary prediction (0 or 1) is very useful!• Spent N hours for study, pass or fail?• GPA and GRE scores for the HKUST PHD program, admit or not?• Soccer game against Japan, win or lose?• She/he looks good, propose or not? Building fun models• Neural Net components- CNN- RNN• Activations• Losses• Optimizers
2024.8.19 import numpy as npimport matplotlib.pyplot as pltx_data = [1.0, 2.0, 3.0]y_data = [2.0, 4.0, 6.0]w = 1.0def forward(x): return x * wdef loss(x, y): y_pred = forward(x) return (y_pred - y) * (y_pred - y)w_list = []mse_list = []for w in np.arange(0.0, 4.1, 0.1): print("w=", w) l_sum = 0 for x_val, y_val in zip(x_data, y_data): y_pred_val = forward(x_val) l = loss(x_val, y_val..
2024.8.12 Mysql 외부접속 설정디비 접속 계정 생성시작전 root 계정 전환sudo su –nano /etc/mysql/mysql.conf.d/mysqld.cnf 실행한다주석해제 진행저장 ctrl+x → Y 저장방화벽 포트가 비활성화 라면 활성화 적용sudo ufw enablesystemctl restart mysql (데몬 재구동 진행)Mysql 재구동 확인• create user ‘tester2’@’%’ identified by ‘0000’ ; 접속 계정생성• Grant all privileges on *.* to ‘tester2’@’%’; 권한• Flush privileges;• Exit ;• Systemctl restart mysql 재구동• 계정 새로 생성하면서 권한 적용 필• Roo..