Skip to main content

Create Object Segmentation Labels

Project description

MultiVisionToolkit

MultiVisionToolkit is a Python package that provides tools for object detection and segmentation, specifically using the YOLOv8 model. It includes real-time detection on camera video, visualization metrics, and the ability to convert reports to document and PDF files.

Installation

pip install multivision

Usage

Object Detection with YOLOv8

Detailed feature showcase with images:

Download images for created dataset

#download images form internet
#using class name and count for images more than 500 images for best training 
from multivision.dataset import dataset as ds
class_name='dog'
count=100
ds.download_images(class_name,count)

Extract imges from any video

from multivision.dataset import dataset as ds
video_path="video.mp4"
images_folder_path="images"
frame_strid=10
ds.extract_images_video(video_path,images_folder_path,frame_strid)

download video from youtube and extract to images

from multivision.dataset import dataset as ds
video_url="https://www.youtube.com/shorts/6eb9-P6KHN0"

#ds.download_yt(video_url, output_path='.')
#or
output_path="images"
ds.download_yt(video_url, output_path)

Annotation auto label for dataset without any manual tools

from multivision.annotation import autolabel as auto
ontology_dict=auto.create_ontology_dict() #create caption for custom dataset
image_folder=path_of_images_folder"
dataset_folder="dataset_folder_to_save_train,val with images labels "
auto.create_captions(ontology_dict, image_folder, dataset_folder)


training custom datatset with yaml data file for detection training

from multivision.train import yolov8 as y8
model_det_name="yolov8n.pt"
epochs_no=5
data_yaml_path="E:/multivision/dataset/data.yaml"
y8.y8d_train(model_det_name,epochs_no,data_yaml_path)

training custom datatset with yaml data file for segmentation training


model_seg_name="yolov8n-seg.pt"
epochs_no=10
y8.y8s_train(model_name,epochs_no,data_yaml_path)

Visualization Metrics

from multivsion.visualize import vis as vis
vis.images_google_colab(folder_path)
vis.display_images_cv(folder_path,scale_factor)
vis.display_images_with_grid(folder_path, rows, cols)
vis.plot(annotation_path,images_dir_path,yaml_path,samples_no)

Convert Report to Document and PDF

# Example Usage:
folder_path = "images"
output_docx = "output_document.docx"
title = "My Document Title"
author = "Your Name"
pdf_path="book.pdf"
copyright_notice = "© 2023 Falah.G.Salieh"

conclusion = "This is the conclusion of the document."
from multivision.docx import document as doc
from multivision.docx import document as pdf
doc.create_word_document(folder_path, output_docx, title, author, conclusion)
pdf.images_to_pdf(folder_path, pdf_path, title, copyright_notice)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you find MultiVisionToolkit helpful in your work, please consider citing it. You can use the following BibTeX entry:

@software{multivisiontoolkit,
  author = {Falah.G.Salieh},
  title = {MultiVisionToolkit},
  year = {2023},
  url = {https://github.com/falahgs/multivisiontoolkit},
}

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

multivision-0.0.9.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

multivision-0.0.9-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file multivision-0.0.9.tar.gz.

File metadata

  • Download URL: multivision-0.0.9.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for multivision-0.0.9.tar.gz
Algorithm Hash digest
SHA256 03ce321dc6ece7b658295093d3a8a2c792248a0f5e339089d316fc090a56c0fc
MD5 ed87f28c38b224ba036596ec84b7f0be
BLAKE2b-256 cb66c56b0883a93ceceecb2f2fbdb9c4777a6e4efaa6c189f2b7b230acd949ae

See more details on using hashes here.

File details

Details for the file multivision-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: multivision-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for multivision-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 26483f8ccb03afbc5f58cb6319fb5a8f5f49f1c50e7ee6e50baa283e0497befa
MD5 05e9cb6d3d0b55c3a3d3a414de625a13
BLAKE2b-256 ee6a99db01cd7c1eca28f8f7fe75dc3bdd53e117368bdf1cc763783cc3c32ac3

See more details on using hashes here.

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