Quickstart Guide
This guide will help you quickly integrate and use the Techsolut platform for your computer vision projects. Follow these simple steps to start leveraging the power of our AI tools.
Prerequisites
Before getting started, make sure you have the following:
- An active Techsolut account. Create an account if you don't have one yet.
- An API key to access Techsolut services. You can get one in your profile settings.
- Image or video data for analysis (supported formats: JPG, PNG, MP4, MOV).
Step 1: Setup
Install the SDK
pip install techsolut-sdk
npm install techsolut-sdk
composer require techsolut/techsolut-sdk
Configure Authentication
from techsolut import Client
# Initialiser le client avec votre clé API
client = Client(api_key="votre_clé_api")
# Vérifier la connexion
status = client.check_auth()
print(f"Statut de connexion: {status}")
const { TechsolutClient } = require('techsolut-sdk');
// Initialiser le client avec votre clé API
const client = new TechsolutClient({
apiKey: "votre_clé_api"
});
// Vérifier la connexion
client.checkAuth()
.then(status => console.log(`Statut de connexion: ${status}`))
.catch(error => console.error(error));
<?php
require_once 'vendor/autoload.php';
use Techsolut\Client;
// Initialiser le client avec votre clé API
$client = new Client('votre_clé_api');
// Vérifier la connexion
$status = $client->checkAuth();
echo "Statut de connexion: " . $status;
?>
Tip: Store your API key in an environment variable rather than directly in your code to enhance security.
Step 2: First Usage
Object Detection
Let's start with a simple example of object detection in an image:
from techsolut import Client
client = Client(api_key="votre_clé_api")
# Détecter des objets dans une image locale
results = client.detect_objects(
image_path="chemin/vers/votre/image.jpg",
confidence=0.5 # Seuil de confiance minimum
)
# Afficher les résultats
for obj in results:
print(f"Objet: {obj.label}, Confiance: {obj.confidence:.2f}, Position: {obj.box}")
const { TechsolutClient } = require('techsolut-sdk');
const fs = require('fs');
const client = new TechsolutClient({
apiKey: "votre_clé_api"
});
// Lire l'image comme un Buffer
const imageBuffer = fs.readFileSync('chemin/vers/votre/image.jpg');
// Détecter des objets
client.detectObjects({
image: imageBuffer,
confidence: 0.5 // Seuil de confiance minimum
})
.then(results => {
// Afficher les résultats
results.forEach(obj => {
console.log(`Objet: ${obj.label}, Confiance: ${obj.confidence.toFixed(2)}, Position: `, obj.box);
});
})
.catch(error => console.error(error));
<?php
require_once 'vendor/autoload.php';
use Techsolut\Client;
$client = new Client('votre_clé_api');
// Détecter des objets dans une image locale
$results = $client->detectObjects([
'image_path' => 'chemin/vers/votre/image.jpg',
'confidence' => 0.5 // Seuil de confiance minimum
]);
// Afficher les résultats
foreach ($results as $obj) {
echo "Objet: " . $obj->label . ", Confiance: " .
number_format($obj->confidence, 2) . ", Position: " .
json_encode($obj->box) . "\n";
}
?>
Note: The confidence
parameter allows you to set the minimum confidence threshold for detections. Recommended value between 0.4 and 0.6.
Step 3: Advanced Features
Using Your Custom Models
You can use your own models trained on the Techsolut platform:
from techsolut import Client
client = Client(api_key="votre_clé_api")
# Charger votre modèle personnalisé par ID
model_id = "votre_id_modele" # Exemple : "model_12345"
# Faire une prédiction avec votre modèle
results = client.predict_with_model(
model_id=model_id,
image_path="chemin/vers/votre/image.jpg"
)
print(f"Résultats: {results}")
Batch Processing
Process multiple images in a single request for better efficiency:
from techsolut import Client
client = Client(api_key="votre_clé_api")
# Liste de chemins d'images
image_paths = [
"chemin/vers/image1.jpg",
"chemin/vers/image2.jpg",
"chemin/vers/image3.jpg"
]
# Traitement par lots
batch_results = client.batch_process(
operation="detect_objects",
image_paths=image_paths,
confidence=0.5
)
# Afficher les résultats pour chaque image
for i, results in enumerate(batch_results):
print(f"Résultats pour image {i+1}:")
for obj in results:
print(f" - {obj.label}: {obj.confidence:.2f}")
Warning: Batch processing is limited to 20 images per request for standard accounts and 50 images for premium accounts.
Troubleshooting
Common Issues
If you receive an authentication error:
- Check that your API key is correct and active
- Make sure your account has not exceeded usage limits
- Renew your API key in your account settings if necessary
If you have issues with image format:
- Supported formats are: JPG, JPEG, PNG, BMP
- Maximum image size: 10 MB
- Recommended resolution: between 640×480 and 4096×4096 pixels
- If the image is too large, resize it before sending
If you encounter timeout errors:
- Increase the timeout in the client configuration (default: 30 seconds)
- Use smaller or reduced quality images
- Avoid making too many simultaneous requests
- For long processing, use asynchronous operations
client = Client(api_key="your_api_key", timeout=60)
Next Steps
Now that you've started using the Techsolut platform, here are some additional resources to deepen your knowledge: