Description
With Viola android face detection library, you can detect faces in a bitmap, crop faces using predefined algorithm and get additional information from the detected faces.
Viola alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view Viola alternatives based on common mentions on social networks and blogs.
-
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = โค๏ธ -
NotyKT ๐๏ธ
๐ NotyKT is a complete ๐Kotlin-stack (Backend + Android) ๐ฑ application built to demonstrate the use of Modern development tools with best practices implementation๐ฆธ. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
๐ ๏ธ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
Capturable
๐Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image๐ผ๏ธ -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. -
Carousel Recyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager. -
CrunchyCalendar โ awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
SSComposeCookBook
A Collection of major Jetpack compose UI components which are commonly used.๐๐๐ -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
SSCustomBottomNavigation
Animated TabBar with native control and Jetpack Navigation support..โจ๐๐ -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
EasyPermissions-ktx
๐ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
MidJourney Images Compose Multiplatform Mobile Application
This application is developed to display the images created by MidJourney. The application is developed with Compose Multiplatform and works on many platforms including Android and iOS platforms. -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐ ๐ -
TimelineView
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration) -
Vanilla Place Picker
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of Viola or a related project?
README
Viola
With Viola android face detection library, you can detect faces in a bitmap, crop faces using predefined algorithm and get additional information from the detected faces.
[ScreenShot](screenshot/screen_viola_1.jpg)
Getting Started
Demo application
Download sample application [sample_v_1.0.1](app-voila-sample.apk)
Compatibility
- Minimum Android SDK : Viola 1.0.1 requires a minimum API level of 21.
Installation
Download the latest aar from JCenter or grab via
Gradle:
dependencies {
implementation 'com.darwin.viola:still:1.0.1'
}
or Maven:
<dependency>
<groupId>com.darwin.viola</groupId>
<artifactId>still</artifactId>
<version>1.0.1</version>
<type>pom</type>
</dependency>
Usage
Kotlin
val viola = Viola(listener)
viola.detectFace(bitmap)
private val listener: FaceDetectionListener = object : FaceDetectionListener {
override fun onFaceDetected(result: Result) {}
override fun onFaceDetectionFailed(error: FaceDetectionError, message: String) {}
}
with FaceOptions
val faceOption =
FaceOptions.Builder()
.enableProminentFaceDetection()
.enableDebug()
.build()
viola.detectFace(bitmap,faceOption)
Java
Viola viola = new Viola(listener);
viola.detectFace(bitmap);
private final FaceDetectionListener listener = new FaceDetectionListener() {
@Override
public void onFaceDetected(@NotNull Result result) { }
@Override
public void onFaceDetectionFailed(@NotNull FaceDetectionError error, @NotNull String message) { }
};
with FaceOptions
FaceOptions faceOptions = new FaceOptions.Builder()
.enableProminentFaceDetection()
.enableDebug()
.build();
viola.detectFace(bitmap,faceOptions);
Configure the face detector
Viola is currently extended with the following configurations. Instructions on how to use them in your own application are linked below.
FaceOptions | Description | Type | Default |
---|---|---|---|
prominentFaceDetection |
Indicates whether to detect all faces, or to only detect the most prominent face | boolean | false |
cropAlgorithm |
Extended option for controlling crop constraints | CropAlgorithm | CropAlgorithm.THREE_BY_FOUR |
minFaceSize |
The minimum size percentage, relative to the image, of faces to detect | int | 15 |
debug |
enables debug log | boolean | false |
CropAlgorithm.THREE_BY_FOUR : Performs face crop in three by four ratio
CropAlgorithm.SQUARE : Performs face crop in 1:1 ratio(useful when showing face in circular view)
CropAlgorithm.LEAST : Performs face crop with minimum padding(possibly reduce face overlap on multi face detection)
Face detection result
Viola provides the following values in Result class
Result | Description | Type |
---|---|---|
faceCount |
The number of faces croped | int |
facePortraits |
Contains list of cropped faces | FacePortrait |
face |
The cropped face bitmap | Bitmap |
smileProbability |
Giving a probability that the face is smiling | Float |
leftEyeOpenProbability |
Giving a probability that the face's left eye is open | Float |
rightEyeOpenProbability |
Giving a probability that the face's right eye is open | Float |
pixelBetweenEyes |
The number of pixels between the eyes | Double |
faceSizePercentage |
The size of face relative to the input image | Float |
facePose |
Provides rotation of face in X,Y,Z plane | FacePose |
Author
Darwin Francis - @darwinfrancis on GitHub, @darwin-francis on linkedin
Roadmap
Implement face detection and cropping from live camera preview.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
MIT License
Copyright (c) 2020 Darwin Francis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*Note that all licence references and agreements mentioned in the Viola README section above
are relevant to that project's source code only.