Testing CARS API in CARS Analytics UI#
CARS Analytics provides the ability to test the CARS API using the CARS API tester service. Image recommended parameters are shown in Table 39.
Table 39. Image recommended parameters
Parameter | Requirements |
---|---|
Resolution | - Detection of vehicles and LPs: from 100x100 px to 1920x1080 px. |
- LP attribute recognition: from 20x50 to 1920x1080 px. | |
- Recognition of vehicle attributes: from 100x100 to 1920x1080 px. | |
Maximum file size | 3 Mb |
Image color | Color or black and white image |
Image format | JPEG or PNG |
Frame composition | - Vehicle and LP must be fully visible (not blocked by other objects) |
- When recognizing vehicle attributes, the image should not contain more than one vehicle | |
- LP should occupy the entire area of the image when only LP attributes are recognized |
CARS API tester is available at the following address:
http://<IP_address>:8080/cars_api_tester
The CARS Analytics UI administrator account is used to sign in.
Testing of the following requests is available:
- Vehicle/License plate classify – recognition of the attributes of one pair of vehicle and LP;
- Vehicle/License plate detect – detection of vehicles and LPs;
- Vehicle frame processing – emulation of LUNA CARS operation for one image;
- Animal detect – animal detection request;
- Smoke/Fire detect – request for smoke and/or fire detection.
A detailed description of the available requests is in the file
/docs/API/eng/API_Reference_Manual.html
The CARS API tester interface (Figure 9). The interface elements are described in Table 40.
Table 40. Description of interface elements
№ | Description |
---|---|
1 | IP address of the tested CARS API. The IP address is set at the installation stage, see «LUNA CARS. Installation Manual» |
2 | CARS API version |
3 | List of available classifiers. For a description of each classifier, see «CARS API. Administrator's Guide» |
4 | List of available detectors. For a description of each detector, see «CARS API. Administrator's Guide» |
5 | Request type: |
- Vehicle/License plate classify | |
- Vehicle/License plate detect | |
- Vehicle frame processing | |
- Animal detect | |
- Smoke/Fire detect |
«Vehicle/License plate classify» Request#
The Vehicle/License plate classify request allows you to get the attributes of the vehicle and LP.
The Vehicle/License plate classify request interface (Figure 10). The request sending algorithm is shown in Table 41.
Table 41. Description of interface elements
№ | Description |
---|---|
1 | Fields for uploading images of the vehicle or LP. You must click and select the image in the explorer window that appears. Images must comply with the requirements (Table 39). To reset the image, click on to the right of the uploaded image |
2 | List of classifiers that need to process images. To submit a request, at least one classifier must be selected for each uploaded image. |
3 | Confirmation of sending the request. To send a request, click the "Send!" button. |
4 | The result of image processing. The result is displayed as a list of all requested classifiers. By default, the results are hidden, to view each classifier, you must click on in the title bar. In the documentation LUNA CARS API Administration Manual you can find a description of all available classifiers. |
«Vehicle/License plate detect» Request#
The Vehicle/License plate detect request detects all vehicles and LP in the image. The response returns the attributes of the detected objects (coordinates and dimensions of the BBox).
The Vehicle/License plate detect request interface (Figure 11). The request sending algorithm is shown in Table 42.
Table 42. Description of interface elements
№ | Description |
---|---|
1 | Fields for uploading images. You must click and select the image in the explorer window that appears. Images must comply with the requirements (Table 39). To reset the image, click on to the right of the uploaded image |
2 | List of detectors that need to process the image: |
- car – vehicle detector; | |
- grz – LP detector. | |
At least one detector must be selected to send a request. | |
3 | Confirmation of sending the request. To send a request, click the "Send!" button. If you need to display an image with a BBox, set the «Visualize detectors» flag. |
4 | The result of image processing. The result is displayed as a list of all requested detectors. By default, the results are hidden, to view each detector, you must click on in the line of the detector name (Figures 12, 13). The response includes information on each detected vehicle and LP and visualization: |
- BBox coordinates. | |
- original image from BBox on each detected vehicle or GRZ; | |
- miniatures of detected vehicles. | |
Clicking on the image will save the image. |
Example of the result of image processing by the Vehicle detector as a result of executing the query Vehicle/License plate detect (Figure 12).
Example of the result of image processing by the LP as a result of executing the query Vehicle/License plate detect (Figure 13).
«Vehicle frame processing» Request#
The Vehicle frame processing request emulates the CARS API for a single image. As a result of executing this query, CARS Analytics will generate an event on the input image. Processing will occur for all classifiers.
The Classify request interface (Figure 14). The request submission algorithm is shown in Table 43.
Table 43. Description of interface elements
№ | Description |
---|---|
1 | Fields for uploading images. You must click and select the image in the explorer window that appears. Images must comply with the requirements (Table 39). To reset the image, click on to the right of the uploaded image. When the Save as Event flag is activated, the result of the query execution will be saved as an event (it will be displayed in the Events section of the CARS Analytics UI). When the Detect License plate only flag is activated, detection will be performed only for LP with subsequent recognition of attributes. |
2 | Camera name.You must enter a camera name in this parameter. This name will be passed to CARS Analytics as the name of the source that captured the event. |
3 | Confirmation of sending the request. To send a request, click the "Send!" button. If you need to display an image with a BBox, set the «Visualize detectors» flag. |
4 | The result of image processing. The result is displayed as a list of all detected objects. By default, the results are hidden, to view each object, you must click on in the title bar. The answer includes: |
- Vehicle image with BBox around the vehicle; | |
- Thumbnails of detected vehicles and GRZ; | |
- Stream message – summary information on all received attributes; | |
- Information for each classifier: | |
- car_brand_model – vehicle brand and model; | |
-vehicle_type – vehicle type; | |
-vehicle_color – vehicle color; | |
-vehicle_descriptor – vehicle descriptor; | |
-vehicle_emergency_type – affiliation to emergency services and its type; | |
-grz_all_countries – LP attributes. |
Successful «Vehicle frame processing» response (Figure 15).
«Animal detect» Request#
The Animal detect request allows to detect animals in an image using animal detector.
Animal detect request interface (Figure 16).
.
Table 42. Description of interface elements
№ | Description |
---|---|
1 | Fields for uploading images. You must click and select the image in the explorer window that appears. To reset the image, click on to the right of the uploaded image |
2 | Confirmation of sending the request. To send a request, click the "Send!" button. If you need to display an image with a BBox, set the «Visualize detectors» flag. |
3 | The result of image processing. The result is displayed as a list of results of image processing using animal detector, which contains all detected objects. The query response includes: |
- Image of the animals selected BBox around; | |
- Thumbnails of detected animals; | |
- Stream message – summary information on all received attributes; | |
- Detector information: | |
- type - animal type (big_animal, small_animal, bird). |
Example of the result of image processing by the detector as a result of executing the query Animal Detect (Figure 18).
«Smoke/Fire detect» Request#
The Smoke/Fire detect request allows detect smoke and/or fire using a classifier.
Smoke/Fire detect request interface (Figure 19).
Table 42. Description of interface elements
№ | Description |
---|---|
1 | Fields for uploading images. You must click and select the image in the explorer window that appears. To reset the image, click on to the right of the uploaded image |
2 | Set the parameters to split the image into zones. The detector splits the image into a specified number of zones vertically and horizontally: |
- Number block of image in height - number of zones in vertical; | |
- Number block of image in width - number of zones in horizontal; | |
3 | Confirmation of sending the request. Press "Send!" button to send the request. |
4 | Result of image processing. The result is displayed as a list of the results of image processing with the smoke/fire detector, which contains all detected objects. The query response includes: |
- Image with highlighted areas where fire/smoke is detected; | |
- Miniatures of the detected zones; | |
- Stream message – summary information on all received attributes; | |
- Detector information: | |
- type - smoke/fire type (fire, black_smoke, white_smoke). |
Only areas with detected fire/smoke attributes are highlighted in the final image.
Example of the result of image processing by detector as a result of executing the query Smoke/Fire detect (Figure 21).