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.5.tar.gz
(4.0 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.5.tar.gz.
File metadata
- Download URL: cifar10_client-0.1.5.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01265398d5c0b1dc98a81c6b3aed3757b350214a3cfafa89acbcbfd3570a738e
|
|
| MD5 |
2ceec2364e59a1a2cb734547fe529d72
|
|
| BLAKE2b-256 |
26802fd3c3a27e4a066e5085160f8fa24a13e97d3944ff8d054e5f5b8a65d757
|
File details
Details for the file cifar10_client-0.1.5-py3-none-any.whl.
File metadata
- Download URL: cifar10_client-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.4 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 |
205728fa82ff535457e24895b2894ca6aba8fd50f9567913f5df7f96220a57d0
|
|
| MD5 |
aa3ae3c41b7f8f064ec681c261c9f6c2
|
|
| BLAKE2b-256 |
106bd007960a01a290184c98856bb15c2818945ecdcdf4f12526cb7b796c4d0d
|