Skip to content

Commit 037486b

Browse files
committed
Merge branch 'cat_dog_model' into 'master'
cat dog model See merge request ai/esp-dl!204
2 parents b3eb257 + 0b403d3 commit 037486b

40 files changed

+514
-14
lines changed

.gitlab/ci/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ build_example_cat_detect:
172172
variables:
173173
EXAMPLE_DIR: examples/cat_detect
174174

175+
build_example_dog_detect:
176+
extends:
177+
- .build_examples_template
178+
- .rules:build:example_dog_detect
179+
parallel:
180+
matrix:
181+
- IMAGE: [espressif/idf:release-v5.3, espressif/idf:release-v5.5]
182+
TARGET: [esp32p4, esp32s3]
183+
variables:
184+
EXAMPLE_DIR: examples/dog_detect
185+
175186
build_example_color_detect:
176187
extends:
177188
- .build_examples_template

.gitlab/ci/rules.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
.patterns-model_cat_detect: &patterns-model_cat_detect
5656
- "models/cat_detect/**/*"
5757

58+
.patterns-model_dog_detect: &patterns-model_dog_detect
59+
- "models/dog_detect/**/*"
60+
5861
.patterns-model_color_detect: &patterns-model_color_detect
5962
- "models/color_detect/**/*"
6063

@@ -80,6 +83,9 @@
8083
.patterns-example_cat_detect: &patterns-example_cat_detect
8184
- "examples/cat_detect/**/*"
8285

86+
.patterns-example_dog_detect: &patterns-example_dog_detect
87+
- "examples/dog_detect/**/*"
88+
8389
.patterns-example_color_detect: &patterns-example_color_detect
8490
- "examples/color_detect/**/*"
8591

@@ -256,6 +262,19 @@
256262
- <<: *if-dev-push
257263
changes: *patterns-gitlab-ci
258264

265+
.rules:build:example_dog_detect:
266+
rules:
267+
- <<: *if-protected
268+
- <<: *if-label-build
269+
- <<: *if-dev-push
270+
changes: *patterns-esp-dl
271+
- <<: *if-dev-push
272+
changes: *patterns-model_dog_detect
273+
- <<: *if-dev-push
274+
changes: *patterns-example_dog_detect
275+
- <<: *if-dev-push
276+
changes: *patterns-gitlab-ci
277+
259278
.rules:build:example_color_detect:
260279
rules:
261280
- <<: *if-protected

examples/cat_detect/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,22 @@
77

88
# Cat Detect Example
99

10-
A simple image inference example. In this example, we use ``cat.jpg`` for test. With default setting(iou=0.7, conf=0.25), the detection result before quantization is shown below:
10+
A simple image inference example. In this example, we use ``cat.jpg`` for test. With default setting(iou=0.7, conf=0.6), the detection result before quantization is shown below:
1111

12-
![](./img/cat_fp32.jpg)
12+
![](./img/cat_224_224_fp32.jpg)
1313

1414
And the detection result of espdet_pico_224_224_cat after int8 quantization on ESP32-P4 is as follows:
1515

16-
![](./img/cat_n_p4.jpg)
16+
![](./img/cat_224_224_int8_p4.jpg)
1717

1818
## Quick start
1919

2020
Follow the [quick start](https://docs.espressif.com/projects/esp-dl/en/latest/getting_started/readme.html#quick-start) to flash the example, you will see the output in idf monitor:
2121

2222
```
23-
I (1563) cat_detect: [category: 0, score: 0.939913, x1: 357, y1: 212, x2: 639, y2: 479]
24-
I (1563) cat_detect: [category: 0, score: 0.851953, x1: 200, y1: 109, x2: 394, y2: 207]
25-
I (1573) cat_detect: [category: 0, score: 0.817575, x1: 74, y1: 250, x2: 280, y2: 336]
26-
I (1583) main_task: Returned from app_main()
23+
I (1555) cat_detect: [category: 0, score: 0.880797, x1: 0, y1: 171, x2: 428, y2: 479]
24+
I (1555) cat_detect: [category: 0, score: 0.851953, x1: 280, y1: 85, x2: 639, y2: 479]
25+
I (1565) main_task: Returned from app_main()
2726
```
2827

2928
## Configurable Options in Menuconfig
82.7 KB
Loading
82.8 KB
Loading
-97.5 KB
Binary file not shown.
-98.9 KB
Binary file not shown.

examples/cat_detect/main/cat.jpg

-23.5 KB
Loading

examples/cat_detect/main/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## IDF Component Manager Manifest File
22
dependencies:
33
espressif/cat_detect:
4-
version: "^0.1.0"
4+
version: "^0.1.1"
55
override_path: "../../../models/cat_detect"
66
espressif/esp32_p4_function_ev_board_noglib:
77
version: "^4.0.1"

examples/dog_detect/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# The following lines of boilerplate have to be in your project's
2+
# CMakeLists in this exact order for cmake to work correctly
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
add_compile_options(-fdiagnostics-color=always)
6+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
7+
project(dog_detect)

0 commit comments

Comments
 (0)