facemaskdetector | Face mask detection | Computer Vision library
kandi X-RAY | facemaskdetector Summary
kandi X-RAY | facemaskdetector Summary
Face mask detection
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Invoked when an image is available
- Fill the yuv planes
- Convert YUV to RGB value
- Converts YUV420 into ARGB format
- Initialize the preview size
- Creates a TensorFlow session
- Get a transformation matrix for the given reference frame
- Draw the frame to the canvas
- Preprocesses the image
- Invoked when faces detected
- Process detection results
- Initialize the image
- Converts YUV420 into ARGB
- Get the simple name of the caller
- Convert size string to list
- Resume the view
- Draws the results
- Uses the given Bitmap and returns a List of Recognizers
- Create the FaceDetector
- Starts the inference thread
- Retermine the size of a measure
- Get the camera ID
- Convert a list of sizes to a comma - separated string
- Pause handler
- On click
- Creates the camera preview
facemaskdetector Key Features
facemaskdetector Examples and Code Snippets
Community Discussions
Trending Discussions on facemaskdetector
QUESTION
After detecting a face with CameraX and MLKit I need to pass the image to a custom TFLite model (I'm using this one), which detects a facemask. The model accepts images of 224x224 pixels, so I need to take out the part of ImageProxy#getImage()
corresponding to Face#getBoundingBox()
and resize it accordingly.
I've seen this answer which could have been fine but ThumbnailUtils.extractThumbnail()
can't work with a Rect
of 4 coordinates and it's relative to the center of the image, while the face's bounding box might be elsewhere.
The TFLite model accepts inputs like this:
...ANSWER
Answered 2021-Feb-05 at 19:37We will provide a better way to handle the image processing when working with ML Kit.
For now, you could try this method: https://github.com/googlesamples/mlkit/blob/master/android/vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/BitmapUtils.java#L74
It will convert the ImageProxy to Bitmap, and rotate it to upright. The bounding box from the face detection should be applied to the bitmap directly, which means you should be able to crop the bitmap with the Rect bounding box.
QUESTION
I am getting 'Unresolved reference: requireLensFacing' for CameraSelector.Builder.requireLensFacing(lensFacing).build()
I have added camera core dependencies and I can actually open up the CameraSelector class and find the 'requireLensFacing' method inside it. But I just can't use it.
Here is my app gradle:
...ANSWER
Answered 2020-Dec-23 at 11:26You should use it like this val cameraSelector = CameraSelector.Builder().requireLensFacing(lensFacing).build()
you are using Builder
replace it with Builder()
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install facemaskdetector
You can use facemaskdetector like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the facemaskdetector component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page