Coder Social home page Coder Social logo

qa_test_tflite_model's Introduction

Run quality test check on the tflite model

  1. Download Tflite Model and label.txt from Google Cloud
    mkdir tmp
    gsutil cp gs://tpu-cards-bench-test-bucket/tflite/* tmp
  1. Place copy of the labels.txt file in the tmp folder

  2. Create an images directory in the tmp directory

  3. Place test images in tmp/images

  4. Upload to Github (if not previously done)

  5. In GCP Cloud Shell, setup VM Variables (Note: May have to run step 4 first, as needed)

    export PROJECT_ID=project-2019-3mega-01
    export ZONE=us-central1-a
    export INSTANCE_NAME=vm-obj-det-tpu-ubuntu
  1. Start VM
    gcloud compute instances start $INSTANCE_NAME --zone $ZONE
    gcloud compute instances list
  1. SSH into VM
    gcloud compute ssh --project $PROJECT_ID --zone $ZONE $INSTANCE_NAME
  1. On GCP VM, install tflite intepreter package for the appropriate Python version (e.g 3.5):
    curl https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp35-cp35m-linux_x86_64.whl --output tflite_runtime-1.14.0-cp35-cp35m-linux_x86_64.whl


    pip3 install tflite_runtime-1.14.0-cp35-cp35m-linux_x86_64.whl
  1. Clone the QA test Git directory
    git clone https://github.com/mmmwembe/qa_test_tflite_model.git
  1. Change directory into the "qa_test_tflite_model" directory
    cd qa_test_tflite_model
  1. Run label_image.py with the target tflite model, image and labels txt file
    python3 label_image.py \
     --image /tmp/images/test-bs-50.jpeg \
     --model_file /tmp/detect.tflite \
     --label_file /tmp/cards_labels.txt

qa_test_tflite_model's People

Contributors

mmmwembe avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.