Skip to main content

Artificial Vision Library

Project description

ArtificialVision


PyPI version License: MIT GitHub pull requests GitHub contributors GitHub stars


❗️ The package is still under development and has not been released yet ❗️

If the version exceeds 1.0.0, this message will be removed, and the package will become available.


Installation

pip install artificialvision

What is ArtificialVision?

ArtificialVision is the package for makes it easy to get the outcomes of various Machine Learning & Computer Vision technologies. This package's aims are improving the quality and increasing the productivity by using it for convenience in various research and development experiments.

In this Version, just inference & getting the various results are supported. Support for training and fine-tuning will be added in the future.


Contributing to ArtificialVision (Not yet)

All the contributions are welcome !

Check the ContributeGuide.md for more information.

TODO

Primary Methods

  • Classification
  • Object Detection
  • Segmentation
  • Pose Estimation
  • feature Extraction

Secondary Methods

  • Matching
  • Tracking
  • Generation
  • Restoration
  • Super-Resolution

Contributors



Methods Tutorial

Image Classification

example

from artificialvision import ImgClassification
import cv2 

# Read the image
img = cv2.imread('PATH of Image file')

# Get the classification result
ImgClassification.get_result(img)

Currently, only models pretrained on ImageNet are available.


Object Detection

example

from artificialvision import ObjDetection
import cv2

''' Image '''
# Read the image
img = cv2.imread('PATH of Image file')

# Get the detection result with the bounding box
ObjDetection.get_result(img)

# Get the bounding box only
ObjDetection.get_result_with_box(img)

''' Video '''
# Read the video
video = cv2.VideoCapture('PATH of Video file', type=1)

# Get the detection result with the bounding box
ObjDetection.get_result(video)

# Get the bounding box only
ObjDetection.get_result_with_box(video)

hyperparameters

  • type : int, default is 0
    • 0 : Image
    • 1 : Video

Currently, only image and video matching are supported.


Segmentation

example

from artificialvision import Segmentation
import cv2

''' Image '''
# Read the image
img = cv2.imread('PATH of Image file')

# Get the segmentation result
Segmentation.get_result(img)

# Get only the segment map
Segmentation.get_segment_map(img)
''' Video '''
# Read the video
video = cv2.VideoCapture('PATH of Video file', type=1)

# Get the segmentation result
Segmentation.get_result(video)

# Get only the segment map
Segmentation.get_segment_map(video)
''' Webcam (real-time) '''
# start the webcam(recording)
# if finished, press 'q' to stop & get the result
Segmentation.get_result(type=2)

hyperparameters

  • type : int, default is 0

    • 0 : Image
    • 1 : Video
    • 2 : Webcam (real-time)
  • category : int, default is 0

    • segmentation category
    • 0 : Semantic Segmentation
    • 1 : Instance Segmentation
    • 2 : Panoptic Segmentation
  • detail : int, default is 0

    • segmentation detail
    • 0 : Segmentation Result (Overlayed Image)
    • 1 : Segmentation Map
  • get_poligon : bool, default is False

    • If True, get the poligon points of the segmentation result. (Only for the instance segmentation)

Currently, only image and video matching are supported.


Image Matching

example

from artificialvision import ImgMatching
import cv2 

''' Image '''
# Read the images
img1 = cv2.imread('PATH of Image1 file')
img2 = cv2.imread('PATH of Image2 file')

# Get the matching score
ImgMatching.get_matching_score(img1, img2)

# Get the matching result
ImgMatching.get_matching_result(img1, img2)


''' Video '''
# Read the videos
video1 = cv2.VideoCapture('PATH of Video1 file')
video2 = cv2.VideoCapture('PATH of Video2 file')

# Get the matching score
ImgMatching.get_matching_score(video1, video2, type=1)

# Get the matching result
ImgMatching.get_matching_result(video1, video2, type=1)

''' Mixed '''
# Read the images for matchin
img_list = [img1, img2, img3, ...]

# Get the matching score
ImgMatching.get_matching_score(img_list, video1, type=2)

# Get the matching result
ImgMatching.get_matching_result(img_list, video1, type=2)

''' Webcam (real-time) '''
# start the webcam(recording)
# if finished, press 'q' to stop & get the result
ImgMatching.get_matching_result(img_list, type=3)

hyperparameters

  • type : int, default is 0
    • 0 : Image
    • 1 : Video
    • 2 : Mixed
    • 3 : Webcam (real-time)
  • threshold : float, default is 0.5
    • The threshold for the matching score. If the matching score is less than the threshold, it is considered as a matching result. Range is 0.0 ~ 1.0. Recommended is +-0.1 from the default value.

Currently, only image and video matching are supported.


Format

Inference Data Format

Inference data format Type in python Usage Example
Path of the data str '/Path/to/data/file.extension'
List list
Numpy Array numpy.ndarray
Pytorch Tensor torch.Tensor
Tensorflow Tensor tensorflow.python.framework.ops.EagerTensor

Inference Model Format

Inference model format export.py --include Model
PyTorch - model.pt
TorchScript torchscript model.torchscript
ONNX onnx model.onnx
OpenVINO openvino model_openvino_model/
TensorRT engine model.engine
CoreML coreml model.mlmodel
TensorFlow SavedModel saved_model model_saved_model/
TensorFlow GraphDef pb model.pb
TensorFlow Lite tflite model.tflite
TensorFlow Edge TPU edgetpu model_edgetpu.tflite
TensorFlow.js tfjs model_web_model/
PaddlePaddle paddle model_paddle_model/


If you want more information, check the Official Docs(Not yet)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ArtificialVision-0.1.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ArtificialVision-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ArtificialVision-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8b33198d49fdc95cb68239038e60cb73ef1f0b6ac01bdaf117034e6cd363009
MD5 1ba270a8984b7105ab18d4414dee775d
BLAKE2b-256 cbc17ab764835cf39170e3ea302372a637be08774944ecce8b114c7d04a6a3a0

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