Classify Images
This API can be used to classify and validate the car images on certain parameters
POST
AuthBearer token
Prefer ReadMe's own explorer? Open it here.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
image_file | string | Optional | Upload an image to classify and validate |
image_url | string | Optional | URL of an image to classify and validate Default: https://spyne-prod-tech.s3.amazonaws.com/fGD1VC1So/TJgk9lIE/02d374d9674c4d5abb730485cb6d8380/75a6d8bf7a77457c/images/input/hres_I2IXTXOCWE_75a6d8bf7a77457c_Exterior_1.jpg. |
car_classifier | boolean | Optional | Identifies if a car is present in the image Expected response: true / false Default: true. |
car_type_classifier | boolean | Optional | Identifies the type of car present in the image Expected response: SUV / Sedane / Hatchback / Pickup / Sports Default: true. |
car_shoot_category | boolean | Optional | Identifies the shoot category of car Expected response: Exterior/ Interior/ Miscellaneous -- Exterior refers to the detection of the outside of the car -- Interior refers to the detection of the inside of the car -- Miscellaneous refers to the detection of body parts such as the engine, tires, trunk etc. Default: true. |
car_interior_category | boolean | Optional | Identifies the interior car component captured in the image Expected response: Dashboard / Odometer / Gearbox Default: true. |
angle_detection | boolean | Optional | Measures the angle of the car in the image relative to its front view (0°) Minimum value: 0° Maximum value: 359° Default: true. |
crop_detection | boolean | Optional | Determines if the car in the image has been cropped Expected response: true / false Default: true. |
distance_detection | boolean | Optional | Determines if the car was captured from far away Expected response: good / bad Default: true. |
exposure_detection | boolean | Optional | Determines if the car was captured in poor lighting conditions Expected reponse: low / med / high -- low refers to when the car is in a dimly lit environment -- high refers to when the car is in an bright environment -- med refers to when the lighting conditions are optimal Default: true. |
reflection_detection | boolean | Optional | Recognizes the presence of reflections on the car body Expected reponse: true / false Default: true. |
tilt_detection | boolean | Optional | Identifies the tilt of the car in the image relative to the ground Minimum value: 0° Maximum value: 45° Default: true. |
window_tint_detection | boolean | Optional | Recognizes the presence of tinted windows on the car in the image Expected reponse: true / false Default: true. |
tyre_mud_detection | boolean | Optional | Recognizes if mud is present on the tires of the car in the image Expected reponse: clean / dirty && dirty tyre: {count}, clean tyre: {count} Default: true. |
number_plate_detection | boolean | Optional | Determines the presence of license plate on the car in the image Expected reponse: true / false Default: true. |
Sample request
curl --request POST \
--url 'https://api.spyne.ai/auto/classify/v1/image' \
--header 'Authorization: Bearer YOUR_API_KEY'import requests
url = "https://api.spyne.ai/auto/classify/v1/image"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.post(url, headers=headers)
print(response.status_code, response.json())const response = await fetch("https://api.spyne.ai/auto/classify/v1/image", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(response.status, await response.json());Sample response
{
"code": "HTTP_200_SUCCESS",
"message": "Success",
"data": {
"validation_result": {
"car_classifier": {
"value": true
},
"car_type_classifier": {
"value": "SUV"
},
"car_interior_category": {
"value": "Not an interior car image."
},
"car_shoot_category": {
"value": "Exterior"
},
"angle_detection": {
"value": 330
},
"crop_detection": {
"value": {
"left": false,
"top": false,
"right": false,
"bottom": false
}
},
"distance_detection": {
"value": "good"
},
"exposure_detection": {
"value": "Med"
},
"reflection_detection": {
"value": "high"
},
"tilt_detection": {
"value": 4.062
},
"tyre_mud_detection": {
"value": "bad",
"tyres": {
"clean": 0,
"dirty": 2
}
},
"window_tint_detection": {
"value": true
},
"number_plate_detection": {
"value": true
}
}
},
"error": false,
"details": {}
}{
"code": "HTTP_401_UNAUTHORIZED",
"message": "Invalid Auth-key",
"data": {},
"error": true,
"details": {}
}Errors
| Status | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | Invalid Auth-key |
Updated 2 days ago
Did this page help you?
