Skip to main content

A tool to import various dataset formats and upload them to the PropulsionAI platform.

Project description

p8n-importer

Overview

p8n-importer is a versatile dataset import tool designed to simplify the process of importing various dataset formats into the PropulsionAI platform. This tool supports multiple formats, including VOC, YOLO, COCO, Image Classification, and Tabular data, and enables seamless integration with the PropulsionAI ecosystem. The tool now includes enhanced functionalities such as verbose logging and dataset visualization before uploading.

Explore more about PropulsionAI at PropulsionHQ.

Features

  • Multiple Format Support: Easily import datasets in formats like VOC, YOLO, COCO, Image Classification, and Tabular.
  • Direct Upload: Upload datasets directly to the PropulsionAI platform with an easy-to-use command-line interface.
  • Flexibility: Extendable to support additional dataset formats in the future.
  • Secure API Key Handling: API keys are handled securely via environment variables or interactive input.
  • Verbose Logging: Get detailed logs of the import process with the --verbose option.
  • Visualization: Preview the dataset conversion result before uploading with the --visualize option.

Installation

To install `p

8n-importer, you need Python 3.x and pip installed on your system. You can install p8n-importer` directly from PyPI:

pip install p8n-importer

Usage

Command-Line Interface

p8n-importer can be executed from the command line. Here’s how you can use it:

p8n-importer [format] [source_folder] [--verbose] [--no-upload] [--visualize]
  • [format]: The format of your dataset (e.g., voc, yolov8, coco_json, im_classification, tabular).
  • [source_folder]: Path to the source dataset folder.
  • --verbose (optional): Enable verbose logging for detailed information during the import process.
  • --no-upload (optional): Skip uploading the converted dataset to the platform.
  • --visualize (optional): Visualize the dataset conversion result before uploading.

Programmatic Use

p8n-importer also supports being used programmatically as shown in the example below:

from P8nImporter import P8nImporter

importer = P8nImporter(
    api_key="YOUR_API_KEY",
    dataset_id="DATASET_ID",
)

image = "path/to/image.jpg"
annotation_path = "path/to/annotation.txt"

with open(annotation_path, "r") as f:
    annotation = f.read() # should be a string (multiline is supported)

label_names = ["label1", "label2"]

importer.import_task(
    format="yolov8",
    image=image,
    annotation=annotation,
    label_names=label_names,
)

Supported Formats

The following table lists the formats currently supported by p8n-importer, along with their respective format codes:

Format Code Format Input(s) Action(s) Description
voc VOC Image Object Detection Visual
yolov8 YOLOv8 Image Object Detection You Only Look Once, version 8
coco_json COCO JSON Image Object Detection Common Objects in Context, JSON format
im_classification Image Classification Image Classification Generic image classification datasets
tabular Tabular Tabular Classification, Regression Datasets in tabular formats like CSV, Excel, Parquet
iam IAM Image Character Recognition txt file with format "abc.jpg ABC" on each line. images in "image" folder

More formats are planned for future releases.

Visualization Feature (Only supported on CLI)

When using the --visualize flag, you can preview how the dataset will look after conversion. This feature is particularly useful to verify annotations and dataset integrity before uploading it to the PropulsionAI platform.

API Key and Dataset ID

The tool will prompt you for the API key and dataset ID. The API key can also be set as an environment variable PROPULSIONAI_API_KEY.

Contributing

Contributions to p8n-importer are welcome! If you're looking to contribute, please read our Contributing Guidelines.

License

p8n-importer is available under the MIT license. See the LICENSE file for more info.

Contact

For support or any questions, feel free to contact us at info@propulsionhq.com.

Project details


Download files

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

Source Distribution

p8n-importer-1.0.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

p8n_importer-1.0.2-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file p8n-importer-1.0.2.tar.gz.

File metadata

  • Download URL: p8n-importer-1.0.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for p8n-importer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f89b0bf6ccd64104cc7a1480c3e9b860263b82f990bf223380ec0a90c2f18b27
MD5 b3848109e66a923af0f43918ad7a0959
BLAKE2b-256 db05f10cb2b9dfd0595e9d156af70706c1abbb86d24971309cf584fa359f4197

See more details on using hashes here.

File details

Details for the file p8n_importer-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: p8n_importer-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for p8n_importer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42f79a43168a8b393d94cb5b3889a2f8a0039af6fa43e6ee3faff776b268f3ea
MD5 e6b65df762007a529fdbc29e3efbbc6e
BLAKE2b-256 3fec39b489243ed262647289479b17d4d630c39b8916c7582e9c5541a05b2680

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