image-search-raspberry-pi

This is an online image search platform running on the Raspberry Pi via Object detection through Tensorflow lite. It can be used as follows:

  • [x] Search image via URL link
  • [x] Search image via upload an image

Requirements

  • numpy==1.16.2
  • Flask>=1.0.0
  • requests==2.22.0
  • Pillow>=6.2.0
  • Google Edge TPU or Tensorflow Lite (Follow the instructions here), or you can find in my bolg.

Usage

It uses the flask in python, you just need to install the libraries needed and clone the repo on github. Once you finished, you can launch the server by execute the python file:

git clone https://github.com/Evilran/image-search-raspberry-pi.git
cd image-search-raspberry-pi
$ python3 server.py

Then open chromium on Raspberry Pi and visit the website: 127.0.0.1:5000 (port 5000 on the Raspberry Pi. It's the default port of flask framework).

Here's screenshots of running on the Raspberry Pi 3B+ with Coral USB Accelerator:

  • Search image by url:

  • Search image by uploading file:

  • How to use it:

How does image search work on the Raspberry Pi?

Important Things:This program does not have to use the Coral USB Accelerator, but I used it for accelerating the inference process in Tensorflow lite. So, if you don't have a USE accelerator, don't worry!

Thanks for object detection source code in the coral example, this image search platform is based on this. I used the MobileNet SSD v2 (COCO) model by default, you can modify it in the file detect_image.py .

If you don't have a usb accelerator, you can compile the entire Tensorflow lite on the Raspberry Pi and learn about its object detection here.

Last modified: February 15, 2020

Author

Comments

Leave a Reply