Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test detecting packaging with CircularNet models #207

Closed
Tracked by #121
raphael0202 opened this issue Oct 11, 2022 · 3 comments
Closed
Tracked by #121

Test detecting packaging with CircularNet models #207

raphael0202 opened this issue Oct 11, 2022 · 3 comments

Comments

@raphael0202
Copy link
Contributor

raphael0202 commented Oct 11, 2022

What

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

  • packaging material form (ex: bottle)
  • packaging material type (ex: plastic)
  • plastic type if applicable (ex: PET)

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
Copy link
Member

teolemon commented Oct 11, 2022

@Jagrutiti
Copy link
Member

Hi @raphael0202

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

Saved the images in in two different ways:

  • In three different directories named as material_form_model, plastic_model, material_model.
  • Used model names as suffix to images names. Eg: <image_name>_<model_name>.jpg

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
Copy link
Contributor Author

Thanks @Jagrutiti!
Marking this task as completed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants