Skip to main content

manot

pypi versions license

The manot SDK is a wrapper on top of our API to make it easier to work with our model performance monitoring system. Using our SDK you can quickly set up your project by defining a few key parameters, including the paths to your data, classes and model. Once the project is set up you will be able to use the insight method to extract outliers that manot has detected on the new unstructured data that the performance of the model is evaluated on.

Installation

Install manot with pip:

pip install manot

Example

This is an example how to start:

from manot import manotAI

manot = manotAI("manot_service_url", "token")
# Setup process for "local" and "s3" providers
setup = manot.setup(
    data_provider="local", # it must be "s3" or "local"
    arguments={
            "name": "setup_example",
            "images_path": "/path/to/images",
            "ground_truths_path": "/path/to/ground_truths",
            "detections_path": "/path/to/detections",
            "detections_metadata_format": "xyx2y2",  # it must be one of "xyx2y2", "xywh", or "cxcywh"
            "classes_txt_path": "/path/to/classes.txt"
        }
)

# Setup process for deeplake provider
setup = manot.setup(
    data_provider="deeplake",
    arguments={
            "name": "setup_example",
            "detections_metadata_format": "xyx2y2",  # it must be one of "xyx2y2", "xywh", or "cxcywh"
            "deeplake_token": "your deeplake token",
            "data_set": "user/dataset/",
            "detections_boxes_key": "deeplake key where detection boxes are stored",
            "detections_labels_key": "deeplake key where where detection labels are stored",
            "detections_score_key": "deeplake key where detections score is stored",
            "ground_truths_boxes_key": "deeplake key where ground truth boxes are stored",
            "ground_truths_labels_key": "deeplake key where ground truth labels are stored",
            "classes": "classes for deeplake"
        }
)
print(setup)
# {"id": setup_id, "name": "setup_example", "status": "started"}

setup_info = manot.get_setup(setup["id"])
# when setup is successfully finished, then setup_info is {"id": setup_id, "name": "setup_example", "status": "started"}
insight = manot.insight(
    name="insight_example",
    setup_id=setup["id"],
    data_path="/path/to/data",
    data_provider="local",  # it must be "s3" or "local"
    percentage="percentage" # percentage of images to be considered insight should be larger than 0 and less or equal than 100
)
print(insight)
# {"id": insight_id, "name": "insight_example", "status": "started"}

insight_info = manot.get_insight(insight["id"])
# when setup is successfully finished, then insight_info is {"id": insight_id, "name": "setup_example", "status": "started"}
scores = manot.get_scores(insight['id'])
#returns list of all processed images graded by their score from 0 to 10 (higher is more impactful image)
#in case of deeplake please also provide deeplake token 
manot.visualize_data_set(insight_info['data_set']['id'], deeplake_token)
# Upload data for Setup or Insights process
manot.upload_data(dir_path="/path/to/data", process="process_name")

For Setup process

  • dir_path is directory path, which must contain images, detections, and ground_truths folders and classes.txt file.
  • process must be "setup".

For Insight process

  • dir_path is directory path, which must contain data. Data formats must be ".jpeg", ".jpg", ".png", ".avi", ".gif", ".m4v", ".mkv" or ".mp4".
  • process must be "insight".
manot.calculate_map(
    ground_truths_path="/path/to/ground_truths",
    detections_path="/path/to/detections",
    classes_txt_path="/path/to/classes.txt",
    data_provider="local",  # it must be "s3" or "local"
    data_set_id="data_set_id",  # if data_set_id is provided will calculate mAP only on selected data, otherwise will calculate mAP on all the data
)

Resources

Download files

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

Source Distribution

manot-0.6.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manot-0.6.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file manot-0.6.1.tar.gz.

File metadata

  • Download URL: manot-0.6.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for manot-0.6.1.tar.gz
Algorithm Hash digest
SHA256 8726dc533f7a37a6770df8ad1ce5fe73522a71a4709da4ab6cbb18aba5ef095b
MD5 91ad919af48e34540fc7ad69d3ef35eb
BLAKE2b-256 a68aa4fc2c7fc9d6297fa15b628147d7cf0f976107a420a5beabb9097a574b9e

See more details on using hashes here.

File details

Details for the file manot-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: manot-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for manot-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91cea227582ebd2b7294d3896668b259ed004f48685027a2a2a920922af82ec2
MD5 76153262c7718b9cb302ab2bb3c7bbea
BLAKE2b-256 a8213e3a168e7e0f5c732c5244d808a4b9d4560be36dea02cf8e140d22c7076b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page