본문 바로가기

Study

(259)
[jupyter] 테이블 전체 왼쪽 정렬하는 방법 "코드셀"에 아래 코드를 실행시키면 마크다운에서 테이블 전체가 왼쪽 정렬된다. %%html 오른쪽 정렬을 하고 싶을 경우 left 대신 right를 쓰면 된다. reference https://computer-science-student.tistory.com/368
딥러닝 / GAN 문제1. gan 으로 할 수 있는 것이 무엇이 있는가 ? 미술작품속 인물 실물 재현 ※ GAN 의 최신 활용 예 : 사진 한장으로 영상을 생성함 https://techcrunch.com/2019/05/22/mona-lisa-frown-machine-learning-brings-old-paintings-and-photos-to-life/ ※ GAN 의 최신 활용 예 : 눈 감은 사람 사진을 눈 뜬 사람 사진으로 문제2. 적대적 신경망 GAN 의 원리는 어떻게 되는가 ? 문제3. 코드로 구현하게 될 때의 큰 그림은 어떻게 되는가 ? 분류모델은 진짜 데이터에 대한 이해가 필요함. 그래야 생성모델의 가짜 데이터를 판별해낼 수 있음. 문제4. MNIST 데이터를 입력했을 때의 GAN 의 큰 그림은 ? 노이즈 데이..
딥러닝 / 강아지 품종 detection import matplotlib.pyplot as plt import cv2 import numpy as np from IPython.display import display, Image import ipywidgets as widgets import threading # Stop button # ================ stopButton = widgets.ToggleButton( value=False, description='Stop', disabled=False, button_style='danger', # 'success', 'info', 'warning', 'danger' or '' tooltip='Description', icon='square' # (FontAwesome names wi..
딥러닝 / 실시간 웹캠 오브젝 디텍션 1. 동영상 실시간으로 확인 import matplotlib.pyplot as plt import cv2 import numpy as np from IPython.display import display, Image import ipywidgets as widgets import threading # Stop button # ================ stopButton = widgets.ToggleButton( value=False, description='Stop', disabled=False, button_style='danger', # 'success', 'info', 'warning', 'danger' or '' tooltip='Description', icon='square' # (Font..
딥러닝 / 동영상 object detection 주석 설명 # 동영상 오브젝트 디텍션 import cv2 #영상이나 이미지 데이터 전처리를 위한 모듈 import numpy as np LABELS = ['gorani','raccoon'] # 라벨 데이터 #gorani, raccoon CONFIDENCE = 0.3 # 사물이 라벨에 해당하는 데이터인지에 대한 확률 임계치 THRESHOLD = 0.3 #NMS(Num Max Suppression) 박스 안에 사물이 존재할 확률의 임계치 #yolo4버전으로 학습시킨 환경구성파일과 가중치를 로드해서 신경망 구성 net = cv2.dnn.readNetFromDarknet('c:\\animal\\yolov4_custom.cfg','c:\\animal\\yolov4_custom_final.weights') classes =[..
딥러닝 / 동영상 object detection # 동영상 오브젝트 디텍션 import cv2 import numpy as np LABELS = ['gorani','raccoon'] #gorani, raccoon CONFIDENCE = 0.3 THRESHOLD = 0.3 #NMS(Num Max Suppression) net = cv2.dnn.readNetFromDarknet('c:\\animal\\yolov4_custom.cfg','c:\\animal\\yolov4_custom_final.weights') classes =['gorani','raccoon'] #cap = cv2.VideoCapture('D:\\test\\New folder\\test1.mp4') cap = cv2.VideoCapture('c:\\animal\\test2.mp4') #원..
딥러닝 / 고속도로에서 죽는 동물 살리기 GUI 두번째_버튼 두 개 + 사진 저장하지 않고 바로 불러오기 import cv2 import numpy as np LABELS = ['gorani','raccoon'] #gorani, raccoon CONFIDENCE = 0.3 THRESHOLD = 0.3 #NMS(Num Max Suppression) net = cv2.dnn.readNetFromDarknet('C:\\animal\\yolov4_custom.cfg','C:\\animal\\yolov4_custom_final.weights') # 파싱에러가 나는 경우 가중치, 환경구성파일의 파일경로를 지우고, 홈디렉에 옮겨놓고 실행해보면 됨 def main(img_path): img = cv2.imread(img_path) H, W, _ = img.shape blob = cv2.dnn.blobFromImage(im..
딥러닝 / 고라니, 너구리 디텍션2 1. 다크넷 신경망으로 학습할 때의 하이퍼 파라미터 값과 같은 학습 정보 /content/drive/MyDrive/yolo_custom_model_Training3/darknet/cfg/yolo4_custom.cfg 2. 다크넷 신경망의 가중치 /content/drive/MyDrive/yolo_custom_model_Training3/backup/yolo4_custom_last.weights ㅇ고라니와 가중치 환경구성파일을 이용해서 로컬에서 object detection 하기 net = cv2.dnn.readNetFromDarknet('C:\\animal\\yolov4_custom.cfg','C:\\animal\\yolov4_custom_last.weights') 이 부분 코드에 위에서 다운로드 받은 환..
딥러닝 / object detection 주피터에서 실행하기2, 고라니와 너구리 디텍션 NMS : object detectior가 예측한 bounding box중에서 정확한 bounding box를 선택하도록 하는 기법이다. https://naknaklee.github.io/etc/2021/03/08/NMS/ #1. 필요한 패키지 임포트 import cv2 import numpy as np #2. 반드시 custom data 안에 라벨링 된 이름으로 써야함 LABELS = ['pineapple','apple'] #3. object detection하려는 사물의 정확도에 대한 확률에 대한 임계치 정보를 적어줍니다. CONFIDENCE = 0.3 # detection한 사물이 클래스에 해당할 확률 THRESHOLD = 0.3 #NMS(Num Max Suppression) https://nakn..
딥러닝 / object detection 주피터에서 실행하기 ㅇ object detection 진행순서 1. 사진 웹스크롤링 2. 라벨링 프로그램으로 라벨링 3. 코랩에서 라벨링한 이미지를 올리고 학습(200장에 1시간), 가중치와 환경구성 파일 생성 4. 학습 시킨 가중치와 환경 구성파일을 로컬 컴퓨터로 내려받음 5. 로컬 주피터 노트북에서 object detection ㅇ파인애플과 사과 사진으로 실습해보기 1. 파인애플 사진과 사과 사진으로 라벨링해서 학습시킨 가중치와 환경구성파일을 다운로드 받습니다. 2. 함수를 생성해서 detection하기 #1. 필요한 패키지 임포트 import cv2 import numpy as np #2. 반드시 custom data 안에 라벨링 된 이름으로 써야함 LABELS = ['pineapple','apple'] #3. obj..

반응형