Classify Images

This API can be used to classify and validate the car images on certain parameters

POSThttps://api.spyne.ai/auto/classify/v1/image
AuthBearer token

Prefer ReadMe's own explorer? Open it here.

Request body

ParameterTypeRequiredDescription
image_filestringOptionalUpload an image to classify and validate
image_urlstringOptionalURL 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_classifierbooleanOptionalIdentifies if a car is present in the image Expected response: true / false Default: true.
car_type_classifierbooleanOptionalIdentifies the type of car present in the image Expected response: SUV / Sedane / Hatchback / Pickup / Sports Default: true.
car_shoot_categorybooleanOptionalIdentifies 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_categorybooleanOptionalIdentifies the interior car component captured in the image Expected response: Dashboard / Odometer / Gearbox Default: true.
angle_detectionbooleanOptionalMeasures the angle of the car in the image relative to its front view (0°) Minimum value: 0° Maximum value: 359° Default: true.
crop_detectionbooleanOptionalDetermines if the car in the image has been cropped Expected response: true / false Default: true.
distance_detectionbooleanOptionalDetermines if the car was captured from far away Expected response: good / bad Default: true.
exposure_detectionbooleanOptionalDetermines 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_detectionbooleanOptionalRecognizes the presence of reflections on the car body Expected reponse: true / false Default: true.
tilt_detectionbooleanOptionalIdentifies the tilt of the car in the image relative to the ground Minimum value: 0° Maximum value: 45° Default: true.
window_tint_detectionbooleanOptionalRecognizes the presence of tinted windows on the car in the image Expected reponse: true / false Default: true.
tyre_mud_detectionbooleanOptionalRecognizes 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_detectionbooleanOptionalDetermines 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

StatusMeaningWhen it happens
401UnauthorizedInvalid Auth-key

Did this page help you?