Project
Manage project and upload dataset into your projects in Epigos AI.
Epigos offers an API that allows you to upload dataset to your projects. This API is accessible within the Epigos Python SDK.
You’ll need to Create an API Key to Authentication with Epigos AI.
Managing Projects
To manage projects, you can use the Project
class:
project()
Retrieves a project from Epigos AI and returns the Project class that can be used to upload datasets.
Upload dataset
You have the option to upload images alongside annotations suitable for tasks such as object detection and classification.
upload()
You can upload a single image along with its annotation to the project. Currently supported annotation formats are Pascal VOC and YOLO.
Param | Type | Description |
---|---|---|
image_path | string | Path or directory to images to upload. |
annotation_path | string | Optional path to annotation file to annotate the image. For image classification, this will be used as class label if use_folder_as_class_name is false. |
batch_name | string | Name of batch to upload to within project. Defaults to sdk-upload . |
box_format | string | Format of annotation to upload. Options are (coco , pascal_voc , yolo ). Defaults to pascal_voc . |
labels_map | dict | Optional Epigos AI label ID to class name mapping. Useful to skip creating labels if it’s already created in Epigos AI. |
yolo_labels_map | dict | Optional class ID to label name mapping for YOLO annotations. Used to map numeric YOLO label ID’s to actual class names. |
batch_id | string | Optional batch ID if batch is already created in Epigos AI. If not provided, batch_name is used to create/retrieve a batch from Epigos AI. |
use_folder_as_class_name | bool | Optional flag to indicate whether to use parent folder name of image is class label for image classification dataset. |
Upload file for image classification
Upload image with COCO annotation
Upload image with Pascal VOC annotation
Upload image with YOLO annotation
upload_classification_dataset()
You can upload an entire image classification dataset folder. This is useful when you have multiple images in a directory.
The parent folder of the images will be used as categories for the image. Below is a sample of how the directory should look like.
Param | Type | Description |
---|---|---|
images_directory | string | Path to directory containing images to upload. |
batch_name | string | Name of batch to upload to within project. Defaults to sdk-upload . |
num_workers | integer | Number of cpu workers to use for uploading. Defaults to 4 |
upload_coco_dataset()
You can upload an entire folder containing COCO annotations and images. This is useful when you have multiple images in a directory.
Param | Type | Description |
---|---|---|
images_directory | string | Path to directory containing images to upload. |
annotations_path | string | Path to file containing COCO annotations JSON file. |
batch_name | string | Name of batch to upload to within project. Defaults to sdk-upload . |
labels_map | dict | Optional Epigos AI label ID to class name mapping. Useful to skip creating labels if it’s already created in Epigos AI. |
num_workers | integer | Number of cpu workers to use for uploading. Defaults to 4 |
upload_pascal_voc_dataset()
You can upload an entire folder containing PASCAL VOC annotations and images. This is useful when you have multiple images in a directory.
Param | Type | Description |
---|---|---|
images_directory | string | Path to directory containing images to upload. |
annotations_directory | string | Path to directory containing PASCAL VOC annotations. |
batch_name | string | Name of batch to upload to within project. Defaults to sdk-upload . |
labels_map | dict | Optional Epigos AI label ID to class name mapping. Useful to skip creating labels if it’s already created in Epigos AI. |
num_workers | integer | Number of cpu workers to use for uploading. Defaults to 4 |
upload_yolo_dataset()
You can upload an entire folder containing YOLO annotations and images. This is useful when you have multiple images in a directory.
Param | Type | Description |
---|---|---|
images_directory | string | Path to directory containing images to upload. |
annotations_directory | string | Path to directory containing YOLO annotations. |
data_yaml_path | string | Path to file containing YOLO data configuration file yaml. |
batch_name | string | Name of batch to upload to within project. Defaults to sdk-upload . |
labels_map | dict | Optional Epigos AI label ID to class name mapping. Useful to skip creating labels if it’s already created in Epigos AI. |
num_workers | integer | Number of cpu workers to use for uploading. Defaults to 4 |
Checkout the code on Github
Was this page helpful?