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
:bowtie: Create a dashboard with python!

Installation | Documentation | Gitter Chat | Google Group Bowtie Introduction Bowtie is a library for writing dashboards in Python. No need to know we

Jacques Kvam 753 Dec 22, 2022
Simple CLI python app to show a stocks graph performance. Made with Matplotlib and Tiingo.

stock-graph-python Simple CLI python app to show a stocks graph performance. Made with Matplotlib and Tiingo. Tiingo API Key You will need to add your

Toby 3 May 14, 2022
Python wrapper for Synoptic Data API. Retrieve data from thousands of mesonet stations and networks. Returns JSON from Synoptic as Pandas DataFrame

☁ Synoptic API for Python (unofficial) The Synoptic Mesonet API (formerly MesoWest) gives you access to real-time and historical surface-based weather

Brian Blaylock 23 Jan 06, 2023
View part of your screen in grayscale or simulated color vision deficiency.

monolens View part of your screen in grayscale or filtered to simulate color vision deficiency. Watch the demo on YouTube. Install with pip install mo

Hans Dembinski 31 Oct 11, 2022
A TileDB backend for xarray.

TileDB-xarray This library provides a backend engine to xarray using the TileDB Storage Engine. Example usage: import xarray as xr dataset = xr.open_d

TileDB, Inc. 14 Jun 02, 2021
2D maze path solver visualizer implemented with python

2D maze path solver visualizer implemented with python

SS 14 Dec 21, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal)

Mandelbrot-set-Realtime-Viewer- Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal) Control: "WASD" - movement, "

22 Oct 31, 2022
Curvipy - The Python package for visualizing curves and linear transformations in a super simple way

Curvipy - The Python package for visualizing curves and linear transformations in a super simple way

Dylan Tintenfich 55 Dec 28, 2022
The Python ensemble sampling toolkit for affine-invariant MCMC

emcee The Python ensemble sampling toolkit for affine-invariant MCMC emcee is a stable, well tested Python implementation of the affine-invariant ense

Dan Foreman-Mackey 1.3k Jan 04, 2023
A filler visualizer built using python

filler-visualizer 42 filler のログをビジュアライズしてスポーツさながら楽しむことができます! Usage (標準入力でvisualizer.pyに渡せばALL OK) 1. 既にあるログをビジュアライズする $ ./filler_vm -t 3 -p1 john_fill

Takumi Hara 1 Nov 04, 2021
Simple, realtime visualization of neural network training performance.

pastalog Simple, realtime visualization server for training neural networks. Use with Lasagne, Keras, Tensorflow, Torch, Theano, and basically everyth

Rewon Child 416 Dec 29, 2022
Streaming pivot visualization via WebAssembly

Perspective is an interactive visualization component for large, real-time datasets. Originally developed for J.P. Morgan's trading business, Perspect

The Fintech Open Source Foundation (www.finos.org) 5.1k Dec 27, 2022
A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews

hvPlot A high-level plotting API for the PyData ecosystem built on HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it?

HoloViz 694 Jan 04, 2023
Sparkling Pandas

SparklingPandas SparklingPandas aims to make it easy to use the distributed computing power of PySpark to scale your data analysis with Pandas. Sparkl

366 Oct 27, 2022
基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。

COVID-19-Epidemic-Map 基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。 觉得项目还不错的话欢迎给一个star! 项目的源码可以正常运行,各个库的版本、数据库的建表语句、运行过程中遇到的坑以及解决方式在笔记.md中都

31 Dec 15, 2022
Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

AutoViz Automatically Visualize any dataset, any size with a single line of code. AutoViz performs automatic visualization of any dataset with one lin

AutoViz and Auto_ViML 1k Jan 02, 2023
Use Perspective to create the chart for the trader’s dashboard

Task Overview | Installation Instructions | Link to Module 3 Introduction Experience Technology at JP Morgan Chase Try out what real work is like in t

Abdulazeez Jimoh 1 Jan 22, 2022
A simple project on Data Visualization for CSCI-40 course.

Simple-Data-Visualization A simple project on Data Visualization for CSCI-40 course - the instructions can be found here SAT results in New York in 20

Hugo Matousek 8 Oct 27, 2021
A Python package that provides evaluation and visualization tools for the DexYCB dataset

DexYCB Toolkit DexYCB Toolkit is a Python package that provides evaluation and visualization tools for the DexYCB dataset. The dataset and results wer

NVIDIA Research Projects 107 Dec 26, 2022