[카테고리:] 미분류

  • google 음식 분류 모델

    Google AIY Vision Kit에 포함된 음식 분류 모델은 실제로 TensorFlow Lite 형식으로 변환하여 안드로이드에서 사용할 수 있습니다. 하지만 몇 가지 방법이 있습니다.

    AIY Vision Kit 모델 사용 방법

    직접 모델 파일 추출
    AIY Vision Kit의 SD 카드에서 직접 TensorFlow Lite 모델 파일을 추출할 수 있습니다[1]. 이 모델은 2,000개 이상의 음식 카테고리를 인식할 수 있으며, MobileNet V1 아키텍처를 기반으로 합니다[2].

    대안적 접근 방법

    1. Kaggle에서 다운로드
      Kaggle에서 Google AIY 음식 분류 모델을 TensorFlow Lite 형식으로 다운로드할 수 있습니다[3]. 이 모델은 2,023개의 음식 카테고리를 인식하며, 파일 크기는 약 5.11MB입니다.
    2. TensorFlow Hub 활용
      TensorFlow Hub에서 aiy/vision/classifier/food_V1 모델을 다운로드하여 사용할 수 있습니다[4][5]. 이 모델은 TensorFlow Lite 형식으로 제공되며, 안드로이드 앱에 직접 통합 가능합니다.

    안드로이드 통합 과정

    기본 구현

    // TensorFlow Lite 모델 로드
    protected Interpreter tflite;
    tflite = new Interpreter(loadModelFile(activity));
    
    // 이미지 분류 실행
    tflite.run(inputImageData, outputProbabilities);

    실제 구현 예시
    여러 개발자들이 이미 Google AIY 음식 분류 모델을 안드로이드에 성공적으로 통합했습니다[6][7]. 이들은 Kotlin과 CameraX를 사용하여 실시간 음식 인식 앱을 개발했습니다.

    기술적 고려사항

    모델 성능

    • 정확도: 약 76.3%[1]
    • 카테고리 수: 2,000개 이상
    • 파일 크기: 약 5-6MB
    • 아키텍처: MobileNet V1 (모바일 최적화)

    안드로이드 구현 요구사항

    • TensorFlow Lite 라이브러리 의존성 추가
    • 이미지 전처리 (192×192 픽셀 리사이징)
    • 카메라 권한 설정
    • 실시간 추론을 위한 백그라운드 처리

    현재 대안들

    ML Kit 사용
    Google은 현재 ML Kit를 통해 더 향상된 이미지 분류 API를 제공하고 있습니다[8][9]. 이는 커스텀 TensorFlow Lite 모델을 지원하며, 더 쉬운 통합과 향상된 성능을 제공합니다.

    TensorFlow Lite Model Maker
    개발자들은 TensorFlow Lite Model Maker를 사용하여 자체 음식 분류 모델을 훈련하고 안드로이드에 배포할 수 있습니다[10][11]. 이는 전이 학습을 통해 더 특화된 모델을 만들 수 있게 해줍니다.

    결론적으로, Google AIY Vision Kit의 음식 분류 모델은 안드로이드에서 완전히 사용 가능하며, 여러 방법으로 접근할 수 있습니다. 직접 모델 파일을 추출하거나, 공개된 버전을 다운로드하여 사용하는 것이 가장 직접적인 방법입니다.

    출처
    [1] Dish Classifier https://aiyprojects.withgoogle.com/model/food-detector-classifier/
    [2] TensorFlow Lite Image Classification Models with Model Maker – Fritz ai https://fritz.ai/tensorflow-lite-image-classification-models-with-model-maker/
    [3] Google | aiy | Kaggle https://www.kaggle.com/models/google/aiy/tfLite/vision-classifier-plants-v1/1?tfhub-redirect=true
    [4] Streaming Image Recognition by WebAssembly and Tensorflow on … https://blog.yomo.run/posts/streaming-image-recognition-by-webAssembly-and-tensorflow
    [5] food-recommendation · GitHub Topics https://github.com/topics/food-recommendation
    [6] SilviaSantano/Recognize-Food-With-TensorFlow-Lite – GitHub https://github.com/SilviaSantano/Recognize-Food-With-TensorFlow-Lite
    [7] A basic food detection app on Kotlin exclusively for android – GitHub https://github.com/RJohnPaul/food-classifier-app
    [8] ML Kit | Google for Developers https://developers.google.com/ml-kit
    [9] Custom models with ML Kit | Google for Developers https://developers.google.com/ml-kit/custom-models
    [10] TensorFlow Lite Model Maker: Create Models for On-Device Machine Learning https://learnopencv.com/tensorflow-lite-model-maker-create-models-for-on-device-machine-learning/
    [11] TensorFlow Lite Image Classification models with Model Maker https://heartbeat.comet.ml/tensorflow-lite-image-classification-models-with-model-maker-a144801d2abd?gi=c84f7a3764e5
    [12] Introducing the AIY Vision Kit: Add computer vision to your maker … https://developers.googleblog.com/introducing-the-aiy-vision-kit-add-computer-vision-to-your-maker-projects/
    [13] Cook up your own ML recipes with AI Platform | Google Cloud Blog https://cloud.google.com/blog/topics/developers-practitioners/cook-your-own-ml-recipes-ai-platform?hl=en
    [14] Vision – AIY Projects https://aiyprojects.withgoogle.com/vision/
    [15] GitHub – Tobi-Ek/GreenFinder-Android-Development: A deep-learning android app to detect and classify fruits, vegetables and flowers, while providing corresponding knowledgeable information. https://github.com/Tobi-Ek/GreenFinder-Android-Development
    [16] AIY Vision Kit Part 1: TensorFlow Computer Vision on a Raspberry … https://webrtchacks.com/aiy-vision-kit-tensorflow-uv4l-webrtc/
    [17] Image classification Android App- TensorFlow Lite – Own data https://www.youtube.com/watch?v=-gVu-buNRik
    [18] How To Build Your Own Google AIY Without The Kit | Hackaday https://hackaday.com/2017/05/30/diy-google-aiy/
    [19] Vision Kit (V1) – AIY Projects https://aiyprojects.withgoogle.com/vision-v1/
    [20] Build and deploy a custom object detection model with TensorFlow … https://developers.google.com/codelabs/tflite-object-detection-android
    [21] Google AIY Voice Kit 소개 및 구성 – YouTube https://www.youtube.com/watch?v=4oRk-HcL4zI
    [22] Developing AI Based Food Detection App From Images | Google Vision API #imageprocessing #napworks https://www.youtube.com/watch?v=–z4NKumAxQ
    [23] How do I replace the tflites in Tensorflow’s image classification … https://stackoverflow.com/questions/62867121/how-do-i-replace-the-tflites-in-tensorflows-image-classification-example-for-an
    [24] Super Simple Google AIY Surveillance Camera – Not A Bomb https://www.notabomb.org/super-simple-google-aiy-surveillance-camera/
    [25] Google vision API food label detection in android https://stackoverflow.com/questions/42702426/google-vision-api-food-label-detection-in-android
    [26] Using TensorFlow Lite on Android https://blog.tensorflow.org/2018/03/using-tensorflow-lite-on-android.html
    [27] Google AI Edge | Google AI for Developers https://ai.google.dev/edge
    [28] AIY Vision Kit – Image Classification Tutorial https://www.youtube.com/watch?v=phqB0osvXik
    [29] Migrating from Google Mobile Vision | ML Kit | Google for Developers https://developers.google.com/ml-kit/mobile-vision-migration
    [30] 구글 AIY 인공지능 비전 풀 키트 -Google Assistant, TensorFlow … https://vctec.co.kr/product/%EA%B5%AC%EA%B8%80-aiy-%EC%9D%B8%EA%B3%B5%EC%A7%80%EB%8A%A5-%EB%B9%84%EC%A0%84-%ED%92%80-%ED%82%A4%ED%8A%B8-google-assistant-tensorflow-google-aiy-vision-full/17632/
    [31] Migrating from Mobile Vision to ML Kit on Android https://developers.google.com/ml-kit/mobile-vision-migration/android
    [32] Part 2: Building a AIY Vision Kit Web Server with UV4L – webrtcHacks https://webrtchacks.com/aiy-vision-kit-uv4l-web-server/
    [33] Train Your Own Food Classifier with CNN! | TensorFlow Tutorial https://www.youtube.com/watch?v=bVvgOoeB_ek
    [34] Google Mobile Vision에서 이전 | ML Kit | Google for Developers https://developers.google.com/ml-kit/mobile-vision-migration?hl=ko
    [35] food101 | TensorFlow Datasets https://www.tensorflow.org/datasets/catalog/food101
    [36] Google AIY Vision Kit 1.1 at MG Super Labs India https://www.mgsuperlabs.co.in/estore/Google-AIY-Vision-Kit-1.1
    [37] Android에서 ML Kit를 사용하여 얼굴 인식 https://developers.google.com/ml-kit/vision/face-detection/android
    [38] Module: tflite_support.task.vision | Google AI Edge | Google AI for Developers https://ai.google.dev/edge/api/tflite/python/tflite_support/task/vision
    [39] GitHub – googlesamples/android-vision: Deprecated: The Mobile Vision API is now a part of ML Kit: Check out this repo: https://github.com/googlesamples/android-vision
    [40] Object Detection with TensorFlow Lite Model Maker | Google AI Edge | Google AI for Developers https://ai.google.dev/edge/litert/libraries/modify/object_detection
    [41] aiy – Google – Kaggle https://www.kaggle.com/models/google/aiy
    [42] Google AIY Vision Kit Demos – YouTube https://www.youtube.com/watch?v=75Li4nQmUko
    [43] tflite_support.task.vision.ImageClassifier | Google AI Edge | Google AI for Developers https://ai.google.dev/edge/api/tflite/python/tflite_support/task/vision/ImageClassifier
    [44] TensorFlow Lite (Android)를 사용하여 커스텀 객체 감지 모델 빌드 및 배포 | Google for Developers https://developers.google.com/codelabs/tflite-object-detection-android?hl=ko&rut=81530131af01364a76fa6d19d5faf5ff06336216fc6fdd9075a963fcd9dda07b
    [45] Tflite Image classification prediction always shows the same label for Flutter https://stackoverflow.com/questions/72707775/tflite-image-classification-prediction-always-shows-the-same-label-for-flutter
    [46] Dish Classifier https://aiyprojects.withgoogle.com/model/food-detector-classifier
    [47] Text classification with TensorFlow Lite Model Maker | Google AI Edge https://ai.google.dev/edge/litert/libraries/modify/text_classification
    [48] Food Image Deca (10 Classes) Classifier – Computer Vision – GitHub https://github.com/IsraelAzoulay/food-image-deca-classifier-computer-vision
    [49] Loading and running a quantized TensorFlow Lite model on Android https://heartbeat.comet.ml/loading-and-running-a-quantized-tensorflow-lite-model-on-android-18aa7505076a?gi=bbd97660e61a
    [50] Import the necessary packages https://www.andrew.cmu.edu/user/mfarag/763/materials/lectures/Lecture_23_TinyML_Software_Suites_TFLite_Example.pdf
    [51] README.md · Dhrumit1314/FoodVision_CV at a39e22474089983be539ba70d4be6c80d7b29f2b https://huggingface.co/Dhrumit1314/FoodVision_CV/blob/a39e22474089983be539ba70d4be6c80d7b29f2b/README.md
    [52] Building a Rune – MLOps for the Edge https://hotg.dev/docs/rune/building-a-rune/
    [53] Maker Kit – AIY Projects https://aiyprojects.withgoogle.com/maker/
    [54] AIY Projects Documentation https://aiyprojects.readthedocs.io/_/downloads/en/latest/pdf/
    [55] GitHub – Jitesh7/awesome-tflite: A curated list of awesome TensorFlow Lite models, samples, tutorials, tools and learning resources. https://github.com/Jitesh7/awesome-tflite
    [56] GitHub – doguilmak/Food-Classification-with-TensorFlow-Hub: This project was created to provide information on how to add and use the pre-trained food classification model through TensorFlow Hub. https://github.com/doguilmak/Food-Classification-with-TensorFlow-Hub
    [57] Generative AI ‘Food Coach’ that pairs food with your mood https://developers.googleblog.com/en/generative-ai-food-coach-that-pairs-food-with-your-mood/
    [58] pre trained or dataset for refrigator tensorflow https://stackoverflow.com/questions/60124590/pre-trained-or-dataset-for-refrigator-tensorflow
    [59] From Bytes to Bites (Deep Learning & AI Generated Recipes) https://devpost.com/software/from-bytes-to-bites-deep-learning-ai-generated-recipes
    [60] thecodemancer/Food-Classification-Model – GitHub https://github.com/thecodemancer/Food-Classification-Model
    [61] Pramit726/MobileNetV2-FoodClassifier – GitHub https://github.com/Pramit726/MobileNetV2-FoodClassifier
    [62] Transfer learning with TensorFlow Hub https://www.tensorflow.org/tutorials/images/transfer_learning_with_hub
    [63] tensorflow hub in flutter_android https://stackoverflow.com/questions/76628949/tensorflow-hub-in-flutter-android
    [64] Building a tflite model for multi class classification https://stackoverflow.com/questions/57282364/building-a-tflite-model-for-multi-class-classification
    [65] VinnyVortex004/Food101-Classifier · Hugging Face https://huggingface.co/VinnyVortex004/Food101-Classifier