https://github.com/cedrickchee/realtime-detectron

Real-time Detectron using webcam.

https://github.com/cedrickchee/realtime-detectron

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

deeplearning demo detectron mask-rcnn object-detection object-segmentation real-time webcam
Last synced: 5 months ago · JSON representation

Repository

Real-time Detectron using webcam.

Basic Info
  • Host: GitHub
  • Owner: cedrickchee
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 10.7 KB
Statistics
  • Stars: 40
  • Watchers: 2
  • Forks: 8
  • Open Issues: 3
  • Releases: 0
Topics
deeplearning demo detectron mask-rcnn object-detection object-segmentation real-time webcam
Created about 8 years ago · Last pushed over 7 years ago
Metadata Files
Readme

README.md

Real-time Detectron

This is a demo project of a real-time Mask R-CNN using Detectron. We will be using consumer grade webcam for capturing the video stream.

Here's an example of demo created by reddit's user _sshin_.

Project Status: Early release. Still in heavy development. What this means is, things might be moved around quickly and things will break.

Introduction

Detectron is Facebook AI Research (FAIR)'s research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.

In this project, we have implemented a simple solution to run Detectron Mask R-CNN algorithm with webcam. We are using Mask R-CNN for object detection and instance segmentation.

Installation

Runtime requirements: * Python 2.7 * Note: Python 3 is not supported by Detectron yet * Ubuntu Linux * Tested in Ubuntu 16.04 LTS. * CUDA 8 and above * Tested with CUDA 8 and CUDA 9. * cuDNN 6 and above * OpenCV 3.4 * Python dependencies * Detectron * Caffe2 (Detectron is powered by the Caffe2 deep learning framework)

Installing Detectron

How to install Detectron and its dependencies (including Caffe2). Please refer to this guide.

Quick Start: Using Detectron

After installation, please see the following for brief instructions covering inference with Detectron.

Inference with Pretrained Models

Directory of Image Files

To run inference on a directory of image files (demo/*.jpg in this example), you can use the inference.py tool. In this example, we're using an end-to-end trained Mask R-CNN model with a ResNet-101-FPN backbone from the model zoo:

First, place inference.py file in Detectron tools directory and visualize.py file in Detectron lib/utils directory. Then, run the following command:

python2 tools/infererence.py \ --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml \ --output-dir /tmp/detectron-visualizations \ --image-ext jpg \ --wts https://s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl \ demo

Detectron should automatically download the model from the URL specified by the --wts argument. This tool will output visualizations of the detections in the directory specified by --output-dir.

Notes:

The code used for this demo in inference.py is the same as the one mentioned in Detectron documentation except with a few modifications to support webcam as input.

Credits

Referenced these implementations:

  1. Demo with Mask R-CNN in Google Colab with GPU acceleration

Owner

  • Name: Cedric Chee
  • Login: cedrickchee
  • Kind: user
  • Location: PID 1
  • Company: InvictusByte

Lead Software Engineer | LLMs | full stack Go/JS dev, backend | product dev @ startups | 🧑‍🎓 CompSci | alumni: fast.ai, Antler.co

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bmabir17 (1)
  • mmilunovic (1)
Pull Request Authors
  • aczyzewski (1)
Top Labels
Issue Labels
Pull Request Labels