Package-level declarations

Types

Link copied to clipboard
data class Achievement(val objectName: String, var certaintyScore: Float, var detectionDate: String? = null)
Link copied to clipboard
enum Model(val id: String, @StringRes val description: Int) : Enum<Model>

These files should be in the assets folder with these names and file extension

Link copied to clipboard
typealias MPImageResultListener = OutputHandler.ResultListener<ObjectDetectorResult, MPImage>
Link copied to clipboard
class MyImageAnalyser(val context: Context, val settings: ObjectDetectorSettings = ObjectDetectorSettings(), val resultsCallback: ObjectDetectorCallbacks) : ImageAnalysis.Analyzer

This class is the main class that uses the MediaPipe logic https://ai.google.dev/edge/mediapipe/solutions/vision/object_detector/android

Link copied to clipboard

Callbacks to expose callbacks set in MyImageAnalyser for MPImageResultListener, which is set at ObjectDetector.ObjectDetectorOptions.Builder.setResultListener. And for ErrorListener too.

Link copied to clipboard
data class ObjectDetectorSettings(val maxObjectDetections: Int = Companion.maxObjectDetections, val sensitivityThreshold: Float = 0.5f, val model: Model = Model.EFFICIENTDETV0, val processor: Delegate = Delegate.GPU, val mediaTypeToAnalyze: RunningMode = RunningMode.LIVE_STREAM)

A class that encapsulates the different settings that can be to detect objects using MediaPipe

Link copied to clipboard
data class ResultBundle(val detectedObjects: ObjectDetectorResult, val processingTimeMs: Long, val inputImageHeight: Int, val inputImageWidth: Int)

Contains the data necessary to outline an object into the screen. Wraps results from inference, the time it takes for inference to be performed, and the input image and height for properly scaling UI to return back to callers

Properties

Link copied to clipboard
val Detection.certaintyScore: String

Returns the

Link copied to clipboard
val Detection.objectName: String

The name of the detected object It's not clear why categories() is a list https://ai.google.dev/edge/api/mediapipe/python/mp/tasks/components/containers/Detection

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Gets the diff between the local achievements this with the other in Firestore

Link copied to clipboard