Custom ROI in Computer Vision Applications

Overview

stargazers issues forks license

EasyROI

Downloads PyPI version

Helper library for drawing ROI in Computer Vision Applications

demo

Table of Contents

About The Project

Tech Stack

File Structure

.  
├── EasyROI  
│   ├── __init__.py  
│   ├── easyROI.py  
│   └── utils.py  
├── input
│   ├── overpass.mp4   
├── output/  
├── dev_main.py             # Code for testing during developing phase
├── test_library.py         # Code for testing during testing phase
├── DEV_README.md           # README for developing phase 
├── LICENSE  
└── README.md 

Getting Started

Prerequisites

  • python>=3.6
  • pip

Installation

  1. Create virtual environment
python3 -m venv venv_easy_roi
source venv_easy_roi/bin/activate
  1. Install EasyROI
pip install EasyROI

Usage

  • Read the instruction in terminal while drawing roi

Using EasyROI in your project

  • Initializing
from EasyROI import EasyROI

roi_helper = EasyROI(verbose=True)

Rectangular roi

rectangle_demo

rect_roi = roi_helper.draw_rectangle(frame, 3)  # quantity=3 specifies number of rectangles to draw

frame_temp = roi_helper.visualize_roi(frame, rect_roi)

Line Roi

line_demo

line_roi = roi_helper.draw_line(frame, 3)  # quantity=3 specifies number of lines to draw

frame_temp = roi_helper.visualize_roi(frame, line_roi)
  • See roi format in - Line

Circle Roi

circle_demo

circle_roi = roi_helper.draw_circle(frame, 3)   # quantity=3 specifies number of circles to draw

frame_temp = roi_helper.visualize_roi(frame, circle_roi)

Polygon Roi

polygon_demo

polygon_roi = roi_helper.draw_polygon(frame, 3) # quantity=3 specifies number of polygons to draw

frame_temp = roi_helper.visualize_roi(frame, polygon_roi)

Formats of roi

Rectangle

quantity = 1

{
    'roi': {   
                0: {'br_x': 573,
                    'br_y': 443,
                    'h'   : 105,
                    'tl_x': 322,
                    'tl_y': 338,
                    'w'   : 251
                }
            },

    'type': 'rectangle'
}

Line

quantity = 2

{
    'roi': {
                0: {
                    'point1': (374, 395), 
                    'point2': (554, 438)
                },

                1: {
                    'point1': (555, 438), 
                    'point2': (830, 361)
                }
            },

    'type': 'line'
}

Circle

quantity = 2

{
    'roi': {
                0: {
                    'center': (330, 355), 
                    'point2': (552, 375), 
                    'radius': 222
                },

                1: {
                    'center': (702, 374), 
                    'point2': (700, 475), 
                    'radius': 101
                }
            },

    'type': 'circle'
}

Polygon

quantity = 2

{
    'roi': {
                0: {
                    'vertices': [
                        (586, 435), 
                        (534, 582), 
                        (200, 504), 
                        (356, 403)
                    ]
                },
                
                1: {
                    'vertices': [
                        (1108, 507),
                        (738, 662),
                        (709, 497),
                        (711, 494),
                        (927, 414)
                    ]
                }
            },

    'type': 'polygon'
}

Future Work

  • See TODO.md for seeing developments of this project

Contributors

Acknowledgements and Resources

License

Owner
Information Technology Student at VJTI, Mumbai
PolytopeSampler is a Matlab implementation of constrained Riemannian Hamiltonian Monte Carlo for sampling from high dimensional disributions on polytopes

PolytopeSampler PolytopeSampler is a Matlab implementation of constrained Riemannian Hamiltonian Monte Carlo for sampling from high dimensional disrib

9 Sep 26, 2022
Bcc2telegraf: An integration that sends ebpf-based bcc histogram metrics to telegraf daemon

bcc2telegraf bcc2telegraf is an integration that sends ebpf-based bcc histogram

Peter Bobrov 2 Feb 17, 2022
Draw interactive NetworkX graphs with Altair

nx_altair Draw NetworkX graphs with Altair nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead. If you'd like to contrib

Zachary Sailer 206 Dec 12, 2022
trade bot connected to binance API/ websocket.,, include dashboard in plotly dash to visualize trades and balances

Crypto trade bot 1. What it is Trading bot connected to Binance API. This project made for fun. So ... Do not use to trade live before you have backte

G 3 Oct 07, 2022
Matplotlib JOTA style for making figures

Matplotlib JOTA style for making figures This repo has Matplotlib JOTA style to format plots and figures for publications and presentation.

JOTA JORNALISMO 2 May 05, 2022
📊 Extensions for Matplotlib

📊 Extensions for Matplotlib

Nico Schlömer 519 Dec 30, 2022
Domain Connectivity Analysis Tools to analyze aggregate connectivity patterns across a set of domains during security investigations

DomainCAT (Domain Connectivity Analysis Tool) Domain Connectivity Analysis Tool is used to analyze aggregate connectivity patterns across a set of dom

DomainTools 34 Dec 09, 2022
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Glumpy 1.1k Jan 05, 2023
Python package for the analysis and visualisation of finite-difference fields.

discretisedfield Marijan Beg1,2, Martin Lang2, Samuel Holt3, Ryan A. Pepper4, Hans Fangohr2,5,6 1 Department of Earth Science and Engineering, Imperia

ubermag 12 Dec 14, 2022
Matplotlib tutorial for beginner

matplotlib is probably the single most used Python package for 2D-graphics. It provides both a very quick way to visualize data from Python and publication-quality figures in many formats. We are goi

Nicolas P. Rougier 2.6k Dec 28, 2022
metedraw is a project mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors

It is mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors.

Nephele 11 Jul 05, 2022
Small binja plugin to import header file to types

binja-import-header (v1.0.0) Author: matteyeux Import header file to Binary Ninja types view Description: Binary Ninja plugin to import types from C h

matteyeux 15 Dec 10, 2022
Script to create an animated data visualisation for categorical timeseries data - GIF choropleth map with annotations.

choropleth_ldn Simple script to create a chloropleth map of London with categorical timeseries data. The script in main.py creates a gif of the most f

1 Oct 07, 2021
The official colors of the FAU as matplotlib/seaborn colormaps

FAU - Colors The official colors of Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU) as matplotlib / seaborn colormaps. We support the old colo

Machine Learning and Data Analytics Lab FAU 9 Sep 05, 2022
🐞 📊 Ladybug extension to generate 2D charts

ladybug-charts Ladybug extension to generate 2D charts. Installation pip install ladybug-charts QuickStart import ladybug_charts API Documentation Loc

Ladybug Tools 3 Dec 30, 2022
Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects

carcassonne_tools Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects NOTE NOTE NOTE The

1 Nov 08, 2021
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
SummVis is an interactive visualization tool for text summarization.

SummVis is an interactive visualization tool for analyzing abstractive summarization model outputs and datasets.

Robustness Gym 246 Dec 08, 2022
Jupyter notebook and datasets from the pandas Q&A video series

Python pandas Q&A video series Read about the series, and view all of the videos on one page: Easier data analysis in Python with pandas. Jupyter Note

Kevin Markham 2k Jan 05, 2023
Declarative statistical visualization library for Python

Altair http://altair-viz.github.io Altair is a declarative statistical visualization library for Python. With Altair, you can spend more time understa

Altair 8k Jan 05, 2023