senofsky / face-mask-detector Goto Github PK
View Code? Open in Web Editor NEWA library and command line utility for detecting face masks in images and video streams
License: MIT License
A library and command line utility for detecting face masks in images and video streams
License: MIT License
face-mask-detector should have logging capabilities.
I think command_line_interface.py
should configure the logger with a given log level (via the verbose argument) and the rest of the library should use the logger.
train_face_mask_detector.py
creates a model that "switches" the labels, so:
Add a badge of the supported python versions
Documenting which python versions we support is helpful to other developers.
We should document the supported python versions and add them as badges in the README.
Add documentation on how the models work and how to use the library.
The current face_mask_detector.model
struggles at detecting patterned face masks.
The current dataset only contains images of more "standard" masks. In order to improve the model's accuracy, we need to expand the dataset to include people wearing patterned face masks.
The following is a snippet of received type errors:
face_mask_detector/lib.py:4: error: Cannot find implementation or library stub for module named 'cv2'
face_mask_detector/lib.py:6: error: Cannot find implementation or library stub for module named 'imutils'
face_mask_detector/lib.py:7: error: Skipping analyzing 'numpy': found module but no type hints or library stubs
face_mask_detector/lib.py:11: error: Cannot find implementation or library stub for module named 'imutils.video'
face_mask_detector/lib.py:12: error: Cannot find implementation or library stub for module named 'tensorflow.keras.applications.mobilenet_v2'
face_mask_detector/lib.py:13: error: Cannot find implementation or library stub for module named 'tensorflow.keras.preprocessing.image'
face_mask_detector/lib.py:14: error: Cannot find implementation or library stub for module named 'tensorflow.keras.models'
This resource may be of use.
Currently, mypy
is not passing due to a few typing errors.
Hi,
Thank you for sharing this excellent project.
I need to improve the model by increasing the number of pictures (adding more real images) to the data set. My questions are:
thank you very much
The box-related logic is duplicated throughout lib.py
and would be fixed if it was consolidated into a Box
class.
Currently, command_line_interface.py
only accepts images as arguments.
It should also accept different video sources instead of only supporting the webcam.
Currently, mypy is not passing due to a few typing errors.
python scripts/train_face_mask_detector.py -d dataset
will print the following warnings during execution:
/home/senofsky/projects/face-mask-detector/venv/lib/python3.8/site-packages/tensorflow/python/ops/random_ops.py:285: SyntaxWarning: "is" with a literal. Did you mean "=="? minval_is_zero = minval is 0 # pylint: disable=literal-comparison
/home/senofsky/projects/face-mask-detector/venv/lib/python3.8/site-packages/tensorflow/python/ops/random_ops.py:286: SyntaxWarning: "is" with a literal. Did you mean "=="? maxval_is_one = maxval is 1 # pylint: disable=literal-comparison
/home/senofsky/projects/face-mask-detector/venv/lib/python3.8/site-packages/tensorflow/python/ops/ragged/ragged_batch_gather_with_default_op.py:84: SyntaxWarning: "is not" with a literal. Did you mean "!="? if (default_value.shape.ndims is not 0
/home/senofsky/projects/face-mask-detector/venv/lib/python3.8/site-packages/tensorflow/python/ops/ragged/ragged_batch_gather_with_default_op.py:85: SyntaxWarning: "is not" with a literal. Did you mean "!="? and default_value.shape.ndims is not 1):
WARNING:tensorflow:`input_shape` is undefined or non-square, or `rows` is not in [96, 128, 160, 192, 224]. Weights for input shape (224, 224) will be loaded as the default.WARNING:`input_shape` is undefined or non-square, or `rows` is not in [96, 128, 160, 192, 224]. Weights for input shape (224, 224) will be loaded as the default.
2020-07-16 19:26:24.988178: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2020-07-16 19:26:24.988200: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303)
2020-07-16 19:26:24.988219: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (spirit-of-fire): /proc/driver/nvidia/version does not exist2020-07-16 19:26:24.988390: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-07-16 19:26:25.009288: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 3001000000 Hz
2020-07-16 19:26:25.009793: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f4a2c000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:2020-07-16 19:26:25.009812: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
We should add a badge indicating the version of face-mask-detector to the README so it can be quickly identified.
Ideally, this should be the first badge to be displayed.
Currently, _validate_args()
will log an error stating that a directory is not writeable if it does not exist.
While this is technically true, we should notify the users why the directory isn't writeable; notifying the user that the directory does not exist or the permissions are set to read-only is more helpful.
We should always strive to provide a positive user experience.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.