Skip to content

Commit

Permalink
docs: add references to codebase in category-prediction.md
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Apr 5, 2023
1 parent 7863740 commit 56ccfba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/explanations/category-prediction.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Two complementary approaches currently exist in production to predict categories

## Matcher

A simple "matcher" algorithm is used to predict categories from product names. This used to be done using Elasticsearch but it's directly included in Robotoff codebase. It currently works for the following languages: `fr`, `en`, `de`, `es`, `it`, `nl`.
A simple "matcher" algorithm is used to predict categories from product names. This used to be done using Elasticsearch but it's directly included in Robotoff codebase [^matcher]. It currently works for the following languages: `fr`, `en`, `de`, `es`, `it`, `nl`.
The product name and all category names in target languages are preprocessed with the following pipeline:

- lowercasing
Expand All @@ -22,7 +22,7 @@ Many false positive came from the fact some category names were also ingredients

## ML prediction

A neural network model is used to predict categories. Details about the model training, results and model assets are available on the [model robotoff-models release page](/~https://github.com/openfoodfacts/robotoff-models/releases/tag/keras-category-classifier-image-embeddings-3.0).
A neural network model is used to predict categories [^neural]. Details about the model training, results and model assets are available on the [model robotoff-models release page](/~https://github.com/openfoodfacts/robotoff-models/releases/tag/keras-category-classifier-image-embeddings-3.0).

This model takes as inputs (all inputs are optional):

Expand Down Expand Up @@ -52,4 +52,7 @@ Here is a summary on the milestones in category detection:
- 2022-03 | [Disable automatic processing of categories](/~https://github.com/openfoodfacts/robotoff/issues/636)
- 2022-10 | Remove Elasticsearch-based category predictor, switch to custom model in Robotoff codebase

- 2023-03 | Deployment of the [v3 model](/~https://github.com/openfoodfacts/robotoff-models/releases/tag/keras-category-classifier-image-embeddings-3.0)
- 2023-03 | Deployment of the [v3 model](/~https://github.com/openfoodfacts/robotoff-models/releases/tag/keras-category-classifier-image-embeddings-3.0)

[^matcher]: see `robotoff.prediction.category.matcher`
[^neural]: see `robotoff.prediction.category.neural`

0 comments on commit 56ccfba

Please sign in to comment.