Skip to main content

A PyTorch implementation of the YOLO v3 object detection algorithm

Project description

A PyTorch implementation of a YOLO v3 Object Detector

YOLOv3のPyTorch実装版です。
ayooshkathuria/pytorch-yolo-v3の実装を活用させていただいています。

導入方法

pip install pyolov3

使い方

  • Webカメラを使ったサンプルコード
import cv2

from pyolov3 import get_detector

yolo = get_detector("coco", 0.5) # 使用したい学習済みモデルとConfidenceの閾値を設定
cap = cv2.VideoCapture(0)

while True:
    ret, frame = cap.read()

    detimg, result = yolo.detect(frame)
    print(result)

    cv2.imshow("test", detimg)

    key = cv2.waitKey(1)
    if key == ord("q"):
        break

cap.release()
cv2.destroyAllWindows()

使用できる学習済みモデル

現状は以下のモデルを指定できます。

  • MS COCO
    • 80クラス検出モデル
    • Detector("coco", confidence)と指定
  • Open Images Dataset
    • 600クラス検出モデル
    • Detector("openimages", confidence)と指定
  • WIDER FACE
    • 顔検出モデル
    • Detector("widerface", confidence)と指定

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyolov3-0.1.2.tar.gz (18.0 kB view hashes)

Uploaded Source

Built Distribution

pyolov3-0.1.2-py3-none-any.whl (19.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page