Python API for Visual One's few shot learning framework.
Project description
Visual One
Visual One's few shot learning framework allows you to train models for computer vision tasks using only a few samples.
To see some examples, visit the examples page of our website.
Quickstart
-
Install the package:
pip install visualone
-
Submit your email here to receive your public and private keys via email.
-
Train a model by providing some positive samples and some negative sampels:
from visualone import vedx
client = vedx.client(public_key, access_key)
model = client.train(positive_samples, negative_samples)
- Apply the trained model to a new image to do prediction:
client.predict(model['task_id'], image_file)
Description of inputs and outputs:
Trianing:
vedx.client(public_key, access_key)
positive_samples
/negative_samples
must be either:
str
: The path to a directory containing image files representing all of the positive/negative samples.
Orlist
(of strings): The name of the individual files corresponding to the positive/negative samples.
Returns a dict
with the following keys:
task_id
: A unique task id generated for this task. You need to pass this to client.predict
to do prediction.
n_positive_samples
: The number of positive samples used for training the model.
n_negative_samples
: The number of negative samples used for training the model.
success
: 1
if the training was done successfully. 0
if an error occured.
message
: A brief message describing the error if an error occurs.
Prediction:
client.predict(task_id, image_file)
task_id
: The unique task id corresponding to the trained model returned by vedx.train
image_file
: The path to the file for which you want to do inference.
Returns a dict
with the following keys:
task_id
: The task id corresponding to the model.
prediction
: A boolean representing the model prediction. True
means the model predicted a positive label for the given image. False
means the model predicted a negative label for the given image.
confidence
: A number between 0 and 100 representing the confidence of the model for this prediction.
latency
: The time it took to do the prediction in millisecond.
Report Bugs/Issues & Feature Request
Please, help us improve our product by reporting any bugs or issues while using visualone. Also, feel free to let us know any feature requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for visualone-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3633a4e59e331da4790e9f607636a582fd5c19b6b906bfea6a66c402ecc88609 |
|
MD5 | 89fca7124aa62eb528bf0f26ebb81e2c |
|
BLAKE2b-256 | 912f3c5b13cf75c6cde15009efd5be5867e0595f5ab987a6566ab0cec46fbda7 |