Skip to main content

ImageAnalyst

ImageAnalyst is a library that simplifies image analysis. The library achieves this goal by standardizing the input and output vectors of a few machine learning models and by providing some high-level analysis algorithms.

Requirements

The application requires:

Extras

The application has some extras that can be installed:

Download & Installation

There is two ways to download and install the application.

Using PyPI

You can download and install the application using PyPI. To do so, run the following command:

pip install image-analyst

Using the GitHub releases

You can download the application on the downloads page. Then, you can install the application by running the following command:

pip install image_analyst-X.X.X-py3-none-any.whl

(Note: The X.X.X must be replaced by the version that you want to install.)

Example

This example allows you to track objects from your webcam. It requires the cv2 extra.

from image_analyst.cv2.utils import convert_image, create_frame_generator
from image_analyst.cv2.models import YoloV3OpenCV
from image_analyst.trackers import IOUTracker
import cv2

def report_callback(filename: str, current_size: float, total_size: float):
    print("{} {:.2f}%".format(filename, current_size/total_size*100), end="\r", flush=True)

model = YoloV3OpenCV.coco(report_callback=report_callback)

tracking_function = IOUTracker(model)

with create_frame_generator(0) as frame_generator:
    for frame in frame_generator:
        converted_frame = convert_image(frame, model.supported_format, model.supported_dtype)
        instances = tracking_function(converted_frame)

        for instance in instances:
            xmin, ymin, xmax, ymax = instance.bounding_box.as_tuple()

            text = "{} {} {:.2f}".format(instance.id, instance.class_name, instance.score)
            cv2.rectangle(frame, (xmin, ymin), (xmax, ymax), (0, 255, 0), 2)
            cv2.putText(frame, text, (xmin, ymin), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)

        cv2.imshow("Tracking", frame)

        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

cv2.destroyAllWindows()

License

All code is licensed for others under a MIT license (see LICENSE).

Metadata

Release files for image-analyst 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-analyst 0.2.1
File Size Uploaded Provenance Actions
image_analyst-0.2.1.tar.gz 9.8 kB Without provenance Details for image_analyst-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for image-analyst 0.2.1
File Interpreter ABI Platform Actions
image_analyst-0.2.1-py3-none-any.whl Python 3 none any Details for image_analyst-0.2.1-py3-none-any.whl

Total release size: 20.9 kB

Release files / image_analyst-0.2.1.tar.gz

Download URL image_analyst-0.2.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f995b1dd3b38931843f4167d967e46cd4cf306efa6cbddb212e91e73b461b6df
BLAKE2b-256 checksum
How to use checksums
03e7cc07511878068111a9b5932616dfe43ec4274c2fbd31679cb1fd8ba13468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / image_analyst-0.2.1-py3-none-any.whl

Download URL image_analyst-0.2.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0cdecb8689c16da533f65ee5c9d6e56b0056b055f7e897d264c721135614112
BLAKE2b-256 checksum
How to use checksums
0641920732fd55b12f206950c3846bf11341940ce9d683c924158545856d1092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for image-analyst 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page