Client for CIFAR-10 image classification API
Project description
CIFAR-10 Client
A Python client for interacting with the CIFAR-10 image classification API.
Installation
pip install cifar10-client
Quick Start
from cifar10_client import CIFAR10Client
# Initialize client
client = CIFAR10Client("http://your-api-url:5000")
# Single prediction
result = client.predict_single("path/to/image.jpg")
print(f"Prediction: {result['prediction']} ({result['confidence']}%)")
# Top 3 predictions
result = client.predict_top3("path/to/image.jpg")
for pred, conf in zip(result['predictions'], result['confidences']):
print(f"{pred}: {conf}%")
# Batch prediction
results = client.predict_batch(["image1.jpg", "image2.jpg"])
for item in results['results']:
print(f"\nFile: {item['filename']}")
for pred, conf in zip(item['predictions'], item['confidences']):
print(f"{pred}: {conf}%")
CLI Usage
# Single prediction
cifar10-predict image.jpg
# Top 3 predictions
cifar10-predict --top3 image.jpg
# Batch prediction
cifar10-predict --batch image1.jpg image2.jpg image3.jpg
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
cifar10_client-0.1.7.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cifar10_client-0.1.7.tar.gz.
File metadata
- Download URL: cifar10_client-0.1.7.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f5890b2653d6b04c4656bcd87e2766f45a702cdf358e15f9c8bcbf5fd10fbd
|
|
| MD5 |
f2e1a72632d376979e435fd9b39cc8c7
|
|
| BLAKE2b-256 |
a6c806c99afdc6ca079aac08f37f32efc21804ca3baf5ef070fe72caf2a4c49d
|
File details
Details for the file cifar10_client-0.1.7-py3-none-any.whl.
File metadata
- Download URL: cifar10_client-0.1.7-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
756f60afe74403961247dbca6df73a656f80cc5d62e998ab997451aba648f9ef
|
|
| MD5 |
c42b57047c32c95a6097486b378e4428
|
|
| BLAKE2b-256 |
64663bc4e69cc60990187b92ce3aec6a04c19bb2967d923a8a4d164272fd96db
|