코랩
2020.08.20
import cv2 import numpy as np from google.colab.patches import cv2_imshow from tqdm import tqdm protoFile_body_25b = "pose_deploy.prototxt" weightsFile_body_25b = "pose_iter_XXXXXX.caffemodel" BODY_PARTS_BODY_25B = {0: "Nose", 1: "LEye", 2: "REye", 3: "LEar", 4: "REar", 5: "LShoulder", 6: "RSoulder", 7: "LElbow", 8: "RElbow", 9: "LWrist", 10: "RWrist", 11: "LHip", 12: "RHip", 13: "LKnee", 14: "R..
파이썬
2020.08.14
https://github.com/CMU-Perceptual-Computing-Lab/openpose_train/tree/master/experimental_models#body-25b-model-option-2-recommended CMU-Perceptual-Computing-Lab/openpose_train Training repository for OpenPose. Contribute to CMU-Perceptual-Computing-Lab/openpose_train development by creating an account on GitHub. github.com pose_iter_XXXXXX.caffemodel 다운로드 (가중치 파일) https://github.com/CMU-Perceptua..
파이썬
2020.07.20
import cv2 import math 필요한 모듈 import def output_keypoints(image_path, proto_file, weights_file, threshold, model_name, BODY_PARTS): global points # 이미지 읽어오기 frame = cv2.imread(image_path) # 네트워크 불러오기 net = cv2.dnn.readNetFromCaffe(proto_file, weights_file) # 입력 이미지의 사이즈 정의 image_height = 368 image_width = 368 # 네트워크에 넣기 위한 전처리 input_blob = cv2.dnn.blobFromImage(frame, 1.0 / 255, (image_width, im..
파이썬
2020.07.17
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..
파이썬
2020.07.16
아래 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..