Skip to content

Commit 9fb58e6

Browse files
committed
updated to new version of yolov8 output
1 parent 0449be5 commit 9fb58e6

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.1.4
2+
* Resolved the YoloV8 output bug and made updates to the latest version. Please find the latest release on the Ultralytics YOLOv8 0.181 GitHub repository
13
## 1.1.3
24
* Release of segmentation feature via YOLOv8.
35
* Updated example code.

android/src/main/java/com/vladih/computer_vision/flutter_vision/models/Yolov8.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ protected List<float[]> filter_box(float[][][] model_outputs, float iou_threshol
8585
int max_index = 0;
8686
float max = 0f;
8787
for (int i = 0; i < dimension; i++) {
88-
float x1 = (model_outputs[0][0][i] - model_outputs[0][2][i] / 2f);
89-
float y1 = (model_outputs[0][1][i] - model_outputs[0][3][i] / 2f);
90-
float x2 = (model_outputs[0][0][i] + model_outputs[0][2][i] / 2f);
91-
float y2 = (model_outputs[0][1][i] + model_outputs[0][3][i] / 2f);
88+
float x1 = (model_outputs[0][0][i] - model_outputs[0][2][i] / 2f)* input_width;
89+
float y1 = (model_outputs[0][1][i] - model_outputs[0][3][i] / 2f)* input_height;
90+
float x2 = (model_outputs[0][0][i] + model_outputs[0][2][i] / 2f)* input_width;
91+
float y2 = (model_outputs[0][1][i] + model_outputs[0][3][i] / 2f)* input_height;
9292

9393
max_index = class_index;
9494
max = model_outputs[0][max_index][i];

example/assets/yolov8n.tflite

44.7 KB
Binary file not shown.

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_vision
2-
description: A Flutter plugin for managing Yolov5, Yolov8 and Tesseract v5 accessing with TensorFlow Lite 2.x. Support object detection, segmentation and OCR on Android. iOS not updated, working in progress.
2+
description: Plugin for managing Yolov5, Yolov8 and Tesseract v5 accessing with TensorFlow Lite 2.x. Support object detection, segmentation and OCR on Android. iOS, Working in progress.
33

4-
version: 1.1.3
4+
version: 1.1.4
55

66
homepage: https://github.com/vladiH/flutter_vision
77

0 commit comments

Comments
 (0)