## SkalaVision API for recognition unlabeled products.
This API is used for recognition (classification) of unlabeled products by its image. Classificator test version you are most likely dealing with works best with fruits, vegetables and herbs (with or without transparent packages and containers) on the weight platform. Product range is not limited by products mentioned before. Recognition system is trained in progress and can be used to identify any unmarked products (for example, cakes or salads in containers, sweets, cereals) on any platform ( scales weight platform, any matte or shiny surfaces).
Recognition quality increases as it is used due to the feedback. The feedback is created based on customer choise. Accuracy improves with the number of weighinings and feedback.
API Operation procedure for recognition on scales/cash desk:
1. Customer puts the product on the scales.
2. Scales/cash desk Software takes a photo and sends the request to API for classifying.
3. The API response offers a set of possible products one of which most likely corresponds to original product.
4. The customer selects required product if it is defined correctly, otherwise, the customer has to use standard menu selection.
5. Selected product (user feedback) is sent to the classifier and recognition part immediately upgrades. It is important that both positive (correct prediction) and negative feedback (incorrect prediction) improve the recognition quality.
The classifier can be divided into several stages:
- initialization;
- prediction;
- additional training.
# # # Initializing the classifier
To initialize the classifier, use the `POST /labels` method to pass the product range that you plan to classify to it.

The product ('Label`) is set by the `label_name` and `description`pair. 'label_name` is a unique product identifier. This ID will be returned during the prediction, and it will also be used for further training of the classifier.
The 'label_name` can be any string: it can be an article number, the product name "Apple_Granny_Smith", "Green Apples" - all these are valid identifiers. It is important that the two products `label_name` do not match, otherwise the classifier response will not be able to distinguish which one is actually in the image.
`description` is a human-readable description of the product. `description` is needed if `label_name `alone cannot tell what product was meant, for example, if an article number or` uuid `is used as`label_name'. If 'label_name' contains a meaningful product name, then 'description' is unnecessary.
Semantically meaningful 'label_name' or 'description' is needed to implement the primary binding of user products to classes that are already "sewn" into the classifier. The better the primary binding based on 'label_name` and 'description', the more accurate the classifier will work at the very beginning, even before it is adapted to the user assortment based on active re-training.
Let's look at some examples of labels.
Let's say we want to add the ability to classify "Gala"apples to the classifier.
{
"label_name": "123891",
"description": null
}
It is impossible to understand what kind of object it is based on such a label. Therefore, until the classifier is fully trained for this product (which will occur after the first weighing), it will not appear in the output.
{
"label_name": "apple_123891",
"description": null
}
It's already better, at least from this label it's clear that the classifier is dealing with apples. Most likely, the classifier will show several varieties of apples, among which, perhaps, there will be a Gala.
{
"label_name": "apple_red_yellow_123891",
"description": null
}
Even better, the classification will only show red and yellow Apple varieties.
{
"label_name": "apple_red_yellow_gala_123891",
"description": null
}
Great, in this case, the binding will be the most accurate and from the very first weighing, the gala apples will most likely be in the output.
Let's say that we want to use only the article number as an identifier, so that the binding is still accurate, we can pass the following as a label:
{
"label_name": "123891",
"description": "apple_red_yellow_gala"
}
# # # Prediction
To make a prediction using the `POST /predict ' method, pass a photo of the recognized object to the service.

The method response contains a list of labels with the classifier's confidence level. The higher the label score, the more likely an object with ' label_name`is in the photo
In case of updating Epelsa scales that are already installed, we can
use work with USB camera from API.

# # # Training