Home Applications workshop-vector-face

workshop-vector-face

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4.75
2 reviews
0
Awards
117
Views
0
IPM installs
0
0
Details
Releases
Reviews
Issues
Pull requests
Articles
Face recognition using vectors and vector search.

What's new in this version

Initial Release

workshop-vector-face

Example about an IRIS production using Embedded Python to recognize and identify faces in photos

You can find more in-depth information in https://learning.intersystems.com.

What do you need to install?

Setup

Build the image we will use during the workshop:

$ git clone https://github.com/intersystems-ib/workshop-vector-face
$ cd workshop-vector-face
$ docker-compose build

The current project is self-deployable and it doesn’t require further configuration. The Python libraries required are installed during the deployment of the container.

Workshop

The main purpose of this example is to test the vector search functionality included into InterSystems IRIS from 2024.1 version.

This project works using the IRIS functionality of Embedded Python to identify faces from jpg files in base64, vectorize it and save into a table with a column of Vector type.

We are going to use two models pre-trained to simplify the code, the first one, mobilenet_graph.pb will help us to recognize all the faces in our image. The second one, facenet_keras_weights.h5 will allow us to compare the face found with the faces in the images of our repository.

To test it you can import into your Postman Vector_search.postman_collection.json, you’ll see two types of HTTP request:
Postman requests

  • Save…: POST requests to save faces into the database.
    Save requests
  • Check similarity: POSTS requests to get the most close face from the database to the picture sent.
    Check requests

How to test it

First step:

To populate the table with the vector column, launch all save requests in the postman file, InterSystems IRIS will receive and save a person record for each save request.
Populated table

Second step:

With the data in our database we can use the vector search functionality sending the check requests. If you want to customize and use your own image you only have to modify the base64 in the body of the request and optionally the name and description of the person. InterSystems IRIS will return the closest person to the image send with the calculated similarity.
Search result

Read more
Made with
Version
1.0.027 Mar, 2024
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
27 Mar, 2024