Inspektlabs’ Photo Quality API | Inspektlabs
What is Inspektlabs’ Photo Quality API?
Inspektlabs' new photo quality API is integral to the car inspection workflow. This API offers an in-depth assessment of a given photo's quality based on multiple parameters. These parameters are spread over three data types: string, integer, and dictionary. The response time of the API is 1-2 seconds per image.
What are the Parameters of this API?
The photo quality API operates using the following parameters: resolution, angle, orientation, Q_score, zoom, blur, luma, and parts detected. Each parameter offers valuable information about the quality of the image, allowing for higher accuracy. Let us take a closer look at each parameter to understand the API comprehensively. The following table illustrates the parameters:
Parameter |
Data Type |
Range |
Resolution |
String |
|
Angle |
String |
[0, 180], "Inconclusive" |
Orientation |
String |
“Left”,”Right”, "Front", "Rear", "Unclear" |
Q_Score |
Integer |
[1,5] |
Zoom |
String |
[1,10], "Inconclusive" |
Blur |
Integer |
[1,5] |
Luma |
Integer |
[1,5] |
Parts Detected |
Dictionary |
NA |
Resolution (String)
This parameter states the resolution of the image in pixels. The resolution value is displayed in this format – (_) x (_) pixels. A higher resolution generally implies that the quality of the image will be better. However, this parameter is not an independent indicator of the overall image quality since other parameters may impact the quality. For example, a high-resolution image may not be usable if the image is highly blurry, identified using the Blur parameter. Typical resolutions are as follows –
3860 x 2160 (2160p)
1920 x 1080 (1080p)
1280 x 720 (720p)
858 x 480 (480p)
480 x 360 (360p)
352 x 240 (240p)
For example, in the two images below, the resolution of the pictures is 2016 x 1512.
In the image below, the resolution of the picture is 4032 x 3024.
Angle (String)
This parameter denotes the angle with respect to the vehicle from where the photo is taken. The range of this parameter is [0, 180], "Inconclusive." When the image is taken from the front of the car, the angle is considered 0°. When the image is taken from the car's rear, the angle is regarded as 180°. When moving from the front to the rear of the vehicle, the angle gradually increases, topping out at 180°. If the image is too zoomed in or for any other reason unclear, the parameter will read 'inconclusive.'
For example, in the image below, the angle of the picture is 50°.
In the image below, the angle of the picture is 170° since the image was taken almost exactly from the rear of the car.
The image below is from the interior of the car. Therefore, the API gave the 'inconclusive' score for this image.
Orientation (String)
The orientation of the image comprises of 5 possible values: "left"," right", "front", "rear", and "unclear." The orientation value is relative to the camera's position with respect to the diver's seat of the vehicle. If the orientation cannot be determined, for example, if the image is too zoomed in, the value will be 'unclear.'
For example, since the image was taken from the front of the vehicle, the orientation value is 'front.'
Since the image was taken too close to the vehicle, the orientation value is 'inconclusive' because the API could not determine it.
Since the image was taken from behind the vehicle, the orientation value is 'rear.'
Since the image was taken from the right of the vehicle, with respect to the driver's seat, the orientation value is 'right.'
Since the image was taken from the left of the vehicle, with respect to the driver's seat, the orientation value is 'left.'
Q_score (Integer)
The Q_score measures whether the photo is standard or non-standard. A standard photo is taken from ~1m distance from one of the eight angles (front, front left, front right, right, left, rear left, rear right, rear). A higher Q_score signifies that the photo is more standardized. The value ranges from [1-5].
For example, the two images below have a Q_score value of 4. These images are highly standardized but not entirely perfect. The distance of the camera from the car is evidently ~1m. Therefore, the Q-score value is relatively high.
On the other hand, the image below has a Q_score of 1. It is apparent that the image was taken from a distance that is much shorter than 1m. Therefore, the Q_score value is the minimum at 1.
The image below was not taken as closely as the image above. However, the distance is still much shorter than 1m. Therefore, the Q_score value is relatively low at 2.
Zoom (String)
The zoom parameter accounts for the distance between the car and the camera. The range for this parameter is [1,10], "Inconclusive." A high zoom score denotes that the image was taken closer to the car, and a lower score indicates the image was captured from far away. If the zoom is not discernible from the picture, the output will be 'inconclusive.'
For example, the image below was taken a short distance from the car. The zoom value is, therefore, relatively high at 9.
The image below was taken at a moderate distance from the car. The zoom value is, therefore, 6.
The image below was taken too close to the car. The zoom value is, therefore, the highest at 10.
Blur (Integer)
The blur parameter measures the blurriness of the image. The range for this parameter is [1,5] ]. A higher blur score signifies that the image is blurry, and a lower blur score suggests that the picture is clearer.
For example, there is no blur in the image below. Therefore, the blue value is 1, which is the least possible value.
The image below is slightly blurry. Therefore, the blur value is 2.
The image below has a moderately significant blur. Therefore, the blur value is 3.
Luma (Integer)
The luma parameter has the following range: [1,5]. The calculation for this parameter is independently done for each image. A lower Luma score indicates shade or low light conditions. Such low light conditions are not ideal for AI damage detection since it is more challenging to detect damages.
For example, the image below is from the interior of the car. Since the image is from an enclosed area, the lighting conditions are not ideal. Therefore, the luma score is relatively lower at 2.
On the contrary, the following two images were taken under adequate lighting conditions. Therefore, the luma value is the highest at 5.
Parts Detected (Dictionary)
The parts detected parameter identifies which parts of the vehicle are visible in the picture. This parameter lists all the car parts the AI can recognize from the image.
Use Case of the Photo Quality API
This photo quality API measures the quality of images across several parameters, as discussed above. The results are highly beneficial because the API considers several factors. If users have access to these results in real-time, they will be alerted if there's a need to retake any images. If an image is unacceptable because of falling short of a parameter, the API will highlight the defect so that the pictures can be retaken accordingly. This mechanism will help save a lot of hassle and time. Instead of the inspection images getting rejected in the middle of the process, the elimination of inadequate pictures can occur at the initial stage.
Not only will the user be alerted that the image is inadequate, but they will also become aware of how to correct the error. For example, if the photo quality API returns a high blur score (say 5), such an image will be unusable. The user will be alerted of the same and can then proceed to take another picture while ensuring that there is no blur in it. Since the API takes only one to two seconds per image, the entire process can conclude within minutes.
One of the most significant pain points of automated car damage detection is that the images are often ruled out during the verification process. Users must restart the entire process from scratch because they need to take new pictures. This approach is unsustainable and counterproductive. The presence of such a photo quality API will rule out these redundancies enabling a smoother user experience.
This photo quality API is beneficial not only for users but also for insurance companies. When evaluators know that the images they receive have passed through the API, it will instill confidence and efficiency from their perspective.
Conclusion
This API is an excellent resource that helps classify every image and ascertain the overall picture quality. Although this API infrequently returns some inaccurate results for specific parameters, such errors are expected initially. The API is bound to improve with time, resulting in more accuracy than ever.