The purpose is to allow the user to create a project, import images, and assign categories to user-drawn rectangles zones of the images.
Make sur to import modules with pip !
pip install -r requirement.txt
usage: main_predictor.py [-h] [--mode MODE] [--path PATH] [--model MODEL]
Facial Mask Recognition script.
optional arguments:
-h, --help show this help message and exit
--mode MODE Launch the script with the given option. Options: [train, predict, preprocess]
--path PATH The path of the input file/directory, needed for preprocess and predict mode. For the training mode,
if --path is not specified, it will take the folder resized_images/ by default.
--model MODEL The path of the model you want for train. By default the model 'final_model.h5' is loaded.
python main_predictor.py --mode predict --path my_image.png
python app.py
[PROJECT]
name = Masks
filepath = /Users/jipey/Desktop/masks
labels = /Users/jipey/Desktop/masks/labels.json
box = /Users/jipey/Desktop/masks/box.json
images = /Users/jipey/Desktop/masks/images
[
{
"filepath": "/Users/jipey/Desktop/masks/images/image.jpg",
"boxList": [
{
"x": 995,
"y": 141,
"width": 557,
"height": 411,
"label": {
"name": "white mask"
}
}
],
"imageSize": [
2048,
1152
]
},
{
"filepath": "/Users/jipey/Desktop/masks/images/mask1.jpg",
"boxList": [
{
"x": 495,
"y": 143,
"width": 106,
"height": 113,
"label": {
"name": "blue mask"
}
},
{
"x": 813,
"y": 169,
"width": 87,
"height": 89,
"label": {
"name": "blue mask"
}
},
{
"x": 335,
"y": 136,
"width": 57,
"height": 68,
"label": {
"name": "blue mask"
}
},
{
"x": 181,
"y": 128,
"width": 63,
"height": 68,
"label": {
"name": "blue mask"
}
}
],
"imageSize": [
1024,
682
]
}
]
[
{
"name": "blue mask"
},
{
"name": "white mask"
}
]