Epigos Python
Epigos provides an end-to-end platform to annotate data, train computer vision AI models, deploy them seamlessly and host the models via API's.
For more details, visit epigos.ai.
The Epigos Python Package is a python wrapper around the core Epigos AI web application and REST API.
Installation
To install this package, please use Python 3.9 or higher.
To add epigos to your project simply install with pip:
pip install epigos
Or with poetry
poetry add epigos
Getting Started
To make your first API call, you will need to signup at epigos.ai and create an API key for your workspace. Please contact our sales team for a demo.
Initialization:
import epigos
client = epigos.Epigos("api_key")
Project:
Manage project and upload dataset into your project using the Project ID.
Upload an image with annotation
import epigos
from epigos.typings import BoxFormat
client = epigos.Epigos("api_key")
# load project
project = client.project("project_id")
# upload image with Pascal VOC annotation
record = project.upload(
"path/to/image.jpg",
annotation_path="path/to/image.xml",
box_format=BoxFormat.pascal_voc
)
print(record)
# upload image with COCO annotation
record = project.upload(
"path/to/image.jpg",
annotation_path="path/to/coco.json",
box_format=BoxFormat.coco
)
print(record)
# upload image with YOLO annotation
record = project.upload(
"path/to/image.jpg",
annotation_path="path/to/image.txt",
box_format=BoxFormat.yolo
)
print(record)
Upload an entire dataset folder
import epigos
client = epigos.Epigos("api_key")
# load project
project = client.project("project_id")
# upload COCO annotation dataset
records = project.upload_coco_dataset(
images_directory="path/to/dataset/train/images",
annotations_path="path/to/dataset/train/coco.json",
)
print(tuple(records))
# upload Pascal VOC annotation dataset
records = project.upload_pascal_voc_dataset(
images_directory="path/to/dataset/train/images",
annotations_directory="path/to/dataset/train/labels",
)
print(tuple(records))
# upload YOLO annotation dataset
records = project.upload_yolo_dataset(
images_directory="path/to/dataset/train/images",
annotations_directory="path/to/dataset/train/labels",
data_yaml_path="path/to/dataset/data.yaml",
)
print(tuple(records))
Prediction:
Make predictions with any of the models deployed in your workspace using the Model ID.
Classification
import epigos
client = epigos.Epigos("api_key")
# load classification model
model = client.classification("model_id")
# make predictions
results = model.predict("path/to/your/image.jpg")
print(results.dict())
Object detection
import epigos
client = epigos.Epigos("api_key")
# load object detection model
model = client.object_detection("model_id")
# make predictions
results = model.detect("path/to/your/image.jpg")
print(results.dict())
# visualize detections
results.show()
Contributing
If you want to extend our Python library or if you find a bug, please open a PR!
Also be sure to test your code with the make command at the root level directory.
Run tests:
make test
Commit message guidelines
It’s important to write sensible commit messages to help the team move faster.
Please follow the commit guidelines
Versioning
This project uses Semantic Versioning.
Publishing
This project is published on PyPi
License
This library is released under the MIT License.
Metadata
Release files for epigos 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| epigos-2.1.0.tar.gz | 17.3 kB | Without provenance | Details for epigos-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| epigos-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for epigos-2.1.0-py3-none-any.whl |
Total release size: 39.0 kB
Release files / epigos-2.1.0.tar.gz
| Download URL | epigos-2.1.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d044fa51d455150734c3153d71dfd1f3399ecb48c9d1b0f9bc2333bbce59600
|
|
BLAKE2b-256 checksum How to use checksums |
48bc56e3b1874dfc4dfdb0ab312ca1d7b020cc103cbe81bbb03c368f8dd0ac8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1018-azure
|
Release files / epigos-2.1.0-py3-none-any.whl
| Download URL | epigos-2.1.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f0f6891f331e669e3f2c0393a9c11208900e3e4768159cfc1c28debe0c8baf5
|
|
BLAKE2b-256 checksum How to use checksums |
e7b8cce350920651f0fcc58fbbb600f32f841b27b923055aaf819fc76d0d9f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1018-azure
|
Security for epigos 2.1.0
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.