Giter Club home page Giter Club logo

face-mask-detector's People

Contributors

kareemsasa3 avatar senofsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

face-mask-detector's Issues

Add logging

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.

Model trainer switches labels

train_face_mask_detector.py creates a model that "switches" the labels, so:

  • a positive face mask detection is labeled as negative
  • a negative face mask detection is labeled as positiive

Declare supported python versions

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 docs

Add documentation on how the models work and how to use the library.

Expand training data to include people wearing patterned face masks

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.

Fix type errors caused by external libraries

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.

Dataset ...

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:

  1. In order to improve the model, do I need just to copy images (with/without face mask) and paste it in corresponding folders or do I need to do extra steps?
  2. If I need to do something else, please direct me to do so.

thank you very much

Fix warnings in train_face_mask_detector.py

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

Add version badge to README

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.

Improve error messages for invalid arguments

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.