forked from am15h/tflite_flutter_helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request am15h#34 from am15h/task_library
Update Support and Task library
- Loading branch information
Showing
19 changed files
with
886 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
# Audio Classification Flutter App | ||
# Real-time Audio Classification Flutter | ||
|
||
Demonstrates the usage of TensorAudio API. | ||
Real-time Audio Classification in flutter. It uses: | ||
|
||
* Interpreter API from TFLite Flutter Plugin. | ||
* TensorAudio API from TFLite Flutter Support Library. | ||
* [YAMNet](https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1), | ||
an audio event classification model. | ||
|
||
<p align="center"> | ||
<img src="audio_demo.gif" alt="animated" /> | ||
</p> | ||
|
||
## Build and run | ||
|
||
### Step 1. Clone TFLite Flutter Helper repository | ||
|
||
Clone TFLite Flutter Helper repository to your computer to get the demo | ||
application. | ||
|
||
``` | ||
git clone https://github.com/am15h/tflite_flutter_helper | ||
``` | ||
|
||
### Step 2. Run the application | ||
|
||
``` | ||
cd example/audio_classification/ | ||
flutter run | ||
``` | ||
|
||
## Resources used: | ||
|
||
* [TensorFlow Lite](https://www.tensorflow.org/lite) | ||
* [Audio Classification using TensorFlow Lite](https://www.tensorflow.org/lite/examples/audio_classification/overview) | ||
* [YAMNet audio classification model](https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bert_question_answer
added at
2c380f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:camera/camera.dart'; | ||
import 'package:image/image.dart'; | ||
import 'package:tflite_flutter/tflite_flutter.dart'; | ||
import 'package:tflite_flutter_helper/src/image/color_space_type.dart'; | ||
import 'package:tflite_flutter_helper/src/tensorbuffer/tensorbuffer.dart'; | ||
|
||
abstract class BaseImageContainer { | ||
|
||
/// Performs deep copy of the {@link ImageContainer}. */ | ||
BaseImageContainer clone(); | ||
|
||
/// Returns the width of the image. */ | ||
int get width; | ||
|
||
/// Returns the height of the image. */ | ||
int get height; | ||
|
||
/// Gets the {@link Image} representation of the underlying image format. */ | ||
Image get image; | ||
|
||
/// Gets the {@link TensorBuffer} representation with the specific {@code dataType} of the | ||
/// underlying image format. | ||
TensorBuffer getTensorBuffer(TfLiteType dataType); | ||
|
||
/// Gets the {@link Image} representation of the underlying image format. */ | ||
CameraImage get mediaImage; | ||
|
||
/// Returns the color space type of the image. */ | ||
ColorSpaceType get colorSpaceType; | ||
} |
Oops, something went wrong.