FaceDetectionModelBase

abstract class FaceDetectionModelBase<I>(modelKindDescription: String?) : OnnxHighLevelModel<I, List<<ERROR CLASS>>>

Base class for face detection models.

Constructors

FaceDetectionModelBase
Link copied to clipboard
common
fun FaceDetectionModelBase(modelKindDescription: String? = null)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

convert
Link copied to clipboard
common
open override fun convert(output: <ERROR CLASS>): List<<ERROR CLASS>>

Converts raw model output to the result.

detectFaces
Link copied to clipboard
common
fun detectFaces(image: I, topK: Int = 5, iouThreshold: Float = 0.5f): List<<ERROR CLASS>>

Detects topK faces on the given image. If topK is negative all detected faces are returned.

initializeWith
Link copied to clipboard
common
open override fun initializeWith(vararg executionProviders: ExecutionProvider)

Initialize the model with the specified executions providers.

predict
Link copied to clipboard
common
open fun predict(input: I): List<<ERROR CLASS>>

Makes prediction on the given input.

summary
Link copied to clipboard
common
open fun summary(): <ERROR CLASS>

Properties

internalModel
Link copied to clipboard
common
abstract val internalModel: OnnxInferenceModel

Model used to make predictions.

modelKindDescription
Link copied to clipboard
common
open override val modelKindDescription: String? = null

High-level description of the model. Used for model summary printing. For the model hub models it equals to the string representation of the OnnxModelType

preprocessing
Link copied to clipboard
common
abstract val preprocessing: <ERROR CLASS><I, <ERROR CLASS><FloatArray, <ERROR CLASS>>>

Preprocessing operation specific to this model.

Inheritors

FaceDetectionModel
Link copied to clipboard

Extensions

detectFaces
Link copied to clipboard
fun FaceDetectionModelBase<Bitmap>.detectFaces(imageProxy: ImageProxy, topK: Int = 5, iouThreshold: Float = 0.5f): List<DetectedObject>

Detects topK faces on the given imageProxy. If topK is negative all detected faces are returned.