The container contains of two parts: Learning and Recognition. The main purpose for the container is to service as a lightweight face recognition where an evaluation is performed through a simple POST request with the images to be evaluated. It also contains a lightweight interface to evaluate and retrain from the defined image set.
The git repository contains a sample set to quickly test the application and the following instructions are using the example library of images. Read further down to get more information on how to define the container.
Use the web form to upload the images for analysis. The response will be listed on the page with the detected faces. You can also use the camera on your phone to select an item to be uploaded
Use a POST request to host:port/upload and the response will be a simple JSON array. If there are no hits, the array will be empty
For initial learning, create folders in dataset for each of the persons that you want to evaluate against. Keep also one that must be named unknown where negative faces are to be put. Spelling in lower case is important. For the pictures, use a smaller size as the learning process is quite compute heavy and it depends a bit on the capacity of your server how large you can go. Make sure that the images only covers the face of the person to be detected
Note that the naming of the image files doesn't really matter. The numbering below is just for illustration purposes
When the classes (folders) have been defined and at least 20 images are in each folder go to the root address and click on Retrain to create the pattern file that new images will be compared against
When you run an evaluation against the model any unknown hits of faces will be put in a seperate folder for classification and you will be asked to move the file into one of the folders (in dataset) or delete it and it will later be used for re-training
If you want to keep the dataset outside the container, map the /app/dataset folder. It is a good idea as it is easier to add and maintain the initial set of images that the model will learn from.
/app/dataset - folder where learning images should be kept
/app/images - folder for temporarily store uploaded images
/app/result - folder for storing result images from a web form upload. If you use the POST API directly the images will not be kept (see curl example above)
/app/unrecognized - folder for images that did not contain a match and can later be used for enhace the learning model