openfoodfacts / openfoodfacts-ai

This is a tracking repo for all our AI projects. 🍕 🤖🍼
223 stars 52 forks source link

Test detecting packaging with CircularNet models #207

Closed raphael0202 closed 1 year ago

raphael0202 commented 2 years ago

What

Google recently released CircularNet, a set of image segmentation models that detect:

It would be very valuable for us to use these models to extract automatically packaging information from images.

Steps

  1. Download images of a subset of Open Food Facts products (a few thousands products is a good start).
    • Make sure this dataset does contain non-French products (currently France still accounts for ~50% of all products).
    • Be gentle with Open Food Facts servers, limit the number of parallel image downloads and notify us on Slack when you start bulk downloading images.
  2. Perform image segmentation with the 3 models, and save the images. Google provides a Google Colab that describes how to use the model on custom images: https://github.com/tensorflow/models/blob/master/official/projects/waste_identification_ml/model_inference/TFHub_saved_model_inference.ipynb
  3. Also output the detected labels for each of the 3 models

Part of

teolemon commented 2 years ago
Jagrutiti commented 1 year ago

Hi @raphael0202

Implemented the code in Google colab: https://colab.research.google.com/drive/1Vcxkj5PFYJ0cz0l6JRp9kKVrrAIgd5vM

Saved the images in in two different ways:

Google Drive link with images: https://drive.google.com/drive/folders/1JSO_HX2tODha8Zr1BQQiRXbs874QY2j-

I had downloaded 1000+ images from Open Food Facts server. Due to limitations of Google Colab server only 100-200 images were processed for each model.

P.S: The best way to view the images is:

  1. Download the images from Google Drive
  2. Sort them in ascending order.
  3. As the images are named after barcodes they are numeric. You can view all three types of model for each image.
raphael0202 commented 1 year ago

Thanks @Jagrutiti! Marking this task as completed :)