All Projects → CarlosPena00 → SimpleVideoAnnotation

CarlosPena00 / SimpleVideoAnnotation

Licence: MIT license
A simple video annotation made with python + OpenCV for detection in YoloV2 format

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to SimpleVideoAnnotation

Labelme
Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
Stars: ✭ 7,742 (+59453.85%)
Mutual labels:  video-annotation, annotations
jupyter-bbox-widget
A Jupyter widget for annotating images with bounding boxes
Stars: ✭ 19 (+46.15%)
Mutual labels:  annotations, bounding-boxes
clothing-detection-ecommerce-dataset
Clothing detection dataset
Stars: ✭ 43 (+230.77%)
Mutual labels:  annotations, bounding-boxes
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+50338.46%)
Mutual labels:  video-annotation, annotations
annotate
Create 3D labelled bounding boxes in RViz
Stars: ✭ 104 (+700%)
Mutual labels:  annotations, bounding-boxes
annotated
Schema generation using annotated entities and mappers
Stars: ✭ 19 (+46.15%)
Mutual labels:  annotations
Vechicle-Detection-Tracking
Vehicle detection and tracking using linear SVM classifier
Stars: ✭ 15 (+15.38%)
Mutual labels:  bounding-boxes
zf-dependency-injection
Advanced dependency injection for laminas framework
Stars: ✭ 17 (+30.77%)
Mutual labels:  annotations
graphql-metadata
Annotate your graphql schema with lightweight directives
Stars: ✭ 28 (+115.38%)
Mutual labels:  annotations
labelCloud
A lightweight tool for labeling 3D bounding boxes in point clouds.
Stars: ✭ 264 (+1930.77%)
Mutual labels:  bounding-boxes
ClassifyCNV
ClassifyCNV: a tool for clinical annotation of copy-number variants
Stars: ✭ 33 (+153.85%)
Mutual labels:  annotations
Exact
An open source online platform for collaborative image labeling of almost everything
Stars: ✭ 47 (+261.54%)
Mutual labels:  annotations
geantyref
Advanced generic type reflection library with support for working with AnnotatedTypes (for Java 8+)
Stars: ✭ 73 (+461.54%)
Mutual labels:  annotations
catnip
Static annotations for Kittens for people who don't like to write semiautomatic derivations into companion objects themselves.
Stars: ✭ 38 (+192.31%)
Mutual labels:  annotations
aspecio
Aspecio, AOP Proxies for OSGi services
Stars: ✭ 14 (+7.69%)
Mutual labels:  annotations
php-simple-request
php-simple-request is a request parser library designed to simplify requests validation and filtering using annotations, generating at the same time an object representation from the request data.
Stars: ✭ 15 (+15.38%)
Mutual labels:  annotations
gum
Repository for the Georgetown University Multilayer Corpus (GUM)
Stars: ✭ 71 (+446.15%)
Mutual labels:  annotations
api-router
👨 RESTful router for your API in Nette Framework (@nette). Created either directly or via annotation.
Stars: ✭ 18 (+38.46%)
Mutual labels:  annotations
orthomosaic
Rectify and stitch images together using multiview geometry.
Stars: ✭ 72 (+453.85%)
Mutual labels:  python-opencv
2vcf
convert 23andme or Ancestry.com raw genotype calls into VCF format, with dbSNP annotations
Stars: ✭ 42 (+223.08%)
Mutual labels:  annotations

Simple Video Annotation

A simple Video annotation made with python + opencv for detection in yolo format

Output Example

https://drive.google.com/drive/folders/1jdrNOeyFmMtlrg8QWdlXW5aZy4HRXJUz

Installation (Tested with python 3.6 and OpenCV 4.4)

You will need OpenCV with ffmpeg lib

conda create -n videoannotation python=3.6
conda activate videoannotation
conda install -c menpo opencv
pip install --upgrade pip 
pip install opencv-contrib-python

Run with Docker

Ubuntu Version: 16.04 / Python 2.7.12 / OpenCV 3.2.0

  1. You need to install Docker and clone this project.

  2. Build docker image (It will take something like 20 minutes or more, depends of your network speed. Because It´s pulls Ubuntu image and install all dependencies, and build OpenCV). This command only need to run once.

    docker build . -t "videoAnnotation:core"
    
  3. You need to make the Display exportable

    xhost +local:root
    
  4. Run and have fun!

    docker run -it --rm -e DISPLAY=${DISPLAY} -e QT_X11_NO_MITSHM=1 -v /tmp/.X11-unix:/tmp/.X11-unix videoannotation:core
    
  5. To pass data through container -> pc host

    docker cp ContainerDockerNumber:/root/VideoAnnotation/ .
    
  6. To pass data through pc host -> container (Pass video file to container)

    docker cp dataPathInHostPc ContainerDockerNumber:/root/VideoAnnotation/
    

Usage example

python VideoAnnotation.py video.mp4

Controls:

  • q - Quit
  • Mouse Left - Create new BoundBox, drag to change the dimension
  • Mouse Right - Erase actual BoundingBox
  • WASD - Move the BoundBox
  • 8456 - Change width and height
  • Space - Next frame
  • Z - Previous
  • 79 - Change current bound box
  • '/' or '*' - Change current class
  • '-' - Delete the bound box
  • R - Get bound box from labels.txt

Variables -- Trackbar

  • ID - Id of the label
  • Jump - How many pixels WASD/8456 will change
  • Skip - How many frames will be skipped

Tree

Givem a video file, it will create:

.
└── VideoFolder (The same name of the video file)
    ├── Ground  (Fold of ground imagens with BoundBox)
    ├── JPEGImages (Fold of imagens without BoundBox)
    ├── labels (Fold with the .txt labels files in yolo format)
 	└──	imgList.txt (List with full directory of images inside JPEGImages folder)

Label Format

(ID) (absoluteX/imgWidth) (absoluteY/imgHeight) (absoluteWidth/imgWidth) (absoluteHeight/imgHeight)

Example: 
  Class Id = 0
  absoluteX = 50  (X of the center of the BoundBox)
  absoluteY = 50  (Y of the center of the BoundBox)
  absoluteWidth = 100 (Width of the BoundBox)
  absoluteHeight = 100 (Height of the BoundBox)
  imgWidth = 400  (Image width)
  imgHeight = 400 (Image Height)

         0 50/400 50/400 100/400 100/400
  Label: 0 0.125  0.125   0.25    0.25

TODO

1. Organize the code
2. Make automatic BoundBox

Please Feel Free to Contact Us!

Carlos Pena (GitHub :octocat:)


[email protected]

Heitor Rapela (GitHub :octocat:)


[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].