전체 글

경험 정리용 연습장
파이썬

Selenium을 이용하여 구글 이미지 크롤링 (Python)

import os import time import socket from urllib.request import urlretrieve from urllib.error import HTTPError, URLError from selenium import webdriver from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException, \ ElementNotInteractableException from PIL import Image from pygame import mixer 필요한 모듈 import def scroll_down(): scroll_count = 0 print("ㅡ 스크롤 다운 시작 ..

파이썬

OpenCV, OpenPose를 이용하여 영상 속 인물의 자세 추정 (Python)

import cv2 필요한 모듈 import def output_keypoints(frame, net, threshold, BODY_PARTS, now_frame, total_frame): global points # 입력 이미지의 사이즈 정의 image_height = 368 image_width = 368 # 네트워크에 넣기 위한 전처리 input_blob = cv2.dnn.blobFromImage(frame, 1.0 / 255, (image_width, image_height), (0, 0, 0), swapRB=False, crop=False) # 전처리된 blob 네트워크에 입력 net.setInput(input_blob) # 결과 받아오기 out = net.forward() # The outpu..

파이썬

[파이썬] OpenCV, OpenPose를 이용하여 사진 속 인물의 자세 추정

아래 Git을 통하여 OpenPose를 다운로드 후 model폴더의 getModels.bat을 실행(윈도우) https://github.com/CMU-Perceptual-Computing-Lab/openpose CMU-Perceptual-Computing-Lab/openpose OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation - CMU-Perceptual-Computing-Lab/openpose github.com import cv2 필요한 모듈 import def output_keypoints(frame, proto_file, weights_file, threshold..

IntegerString
코딩 연습장