The main objective of this project is to detect discriminating features in an image and find the best matching features in other images. Because features should be reasonably invariant to translation, rotation, and illumination.
- Open a
Command Prompt
(NOTWindows PowerShell
) or aTerminal
- Create a conda environment
conda create -n is python=3.6.6 -y
- Activate this environment
activate is
(Windows) orsource activate is
(Linux/macOS) - Install the following packages
tensorflow
,keras
,opencv
,matplotlib
,numpy
,pandas
,scikit-learn
, andnotebook
:
- Python (3.6)
- TensorFlow (2.3.2) -
pip install tensorflow==2.3.2
- Keras (2.1.6) -
pip install keras==2.1.6
- OpenCV (4.4.0) -
pip install opencv==4.0.0
- Matplotlib (3.5.1) -
pip install matplotlib==3.5.1
- Sklearn (0.23.2) -
pip install scikit-learn==0.23.2
- Jupyter (4.7.1) -
pip install notebook
* Step 1. Download Code as Zip OR
git clone https://github.com/ma-shamshiri/Face-Mask-Detection.git
Step 2. Create a new virtual environment
python -m venv tfod #window
virtualenv tfod #Linux
Step 3. Activate your virtual environment
source tfod/bin/activate # Linux
.\tfod\Scripts\activate # Windows
Step 4. Install dependencies and add virtual environment to the Python Kernel
python -m pip install --upgrade pip
pip install ipykernel
python -m ipykernel install --user --name=tfodj
Step 5. Collect images and ensure you change the kernel to the virtual environment.
Step 6. Manually divide collected images into two folders train and test. So now all folders and annotations should be split between the following two folders.
workspace\images\train
workspace\images\test
Step 7. Begin training process by opening 2. Training and Detection.ipynb, this notebook will walk you through installing Tensorflow Object Detection, making detections, saving and exporting your model.
Step 8. During this process the Notebook will install Tensorflow Object Detection. You should ideally receive a notification indicating that the API has installed successfully at Step 8 with the last line stating OK.
Mohammad Amin Shamshiri