Files
2026-03-21 17:08:43 -07:00

1.1 KiB

description
description
Firebase Model plugin for Cordova and Ionic. This plugin downloads the TensorFlow model from firebase and classify the images. ```typescript import {…

Firebase Model

This plugin downloads the TensorFlow model from firebase and classify the images.

import { FirebaseModel } from '@awesome-cordova-plugins/firebase-model';


constructor(private firebaseModel: FirebaseModel) { }

...


this.firebaseModel.configure('Sample_Model')
  .subscribe((res: FirebaseModelConfigResult) => console.log(res.status + " - " + res.progress))
  .catch((error: any) => console.error(error));


try {
   var result:FirebaseModelClassifyResult = await this.firebaseModel.classify("/Documents/input_image.png")
   console.log(result.label + " - " + result.score)

}
catch (e) {
   console.log(e)
}


Installation

ionic cordova plugin add cordova-plugin-firebase-model
npm install @awesome-cordova-plugins/firebase-model

Supported Platforms

  • iOS

Further Information