| Chip | ESPDET_PICO_224_224_CAT | ESPDET_PICO_416_416_CAT |
|---|---|---|
| ESP32-S3 | ||
| ESP32-P4 |
| name | input(hwc) | preprocess(ms) | model(ms) | postprocess(ms) | mAP50-95 on COCO2017 cat |
|---|---|---|---|---|---|
| espdet_pico_224_224_cat_s8_s3 | 224 * 224 * 3 | 8.8 | 123.9 | 0.8 | 0.656 |
| espdet_pico_416_416_cat_s8_s3 | 416 * 416 * 3 | 25.0 | 434.5 | 0.9 | 0.73 |
| espdet_pico_224_224_cat_s8_p4 | 224 * 224 * 3 | 3.1 | 47.5 | 0.3 | 0.663 |
| espdet_pico_416_416_cat_s8_p4 | 416 * 416 * 3 | 8.1 | 182.7 | 0.3 | 0.724 |
CatDetect accepts a CatDetect::model_type_t parameter. It has a default value determined by default model option in menuconfig.
CatDetect *detect = new CatDetect();// use ESPDET_PICO_224_224_CAT
CatDetect *detect = new CatDetect(CatDetect::ESPDET_PICO_224_224_CAT);
// use ESPDET_PICO_416_416_CAT
// CatDetect *detect = new CatDetect(CatDetect::ESPDET_PICO_416_416_CAT);Note
If multiple models is flashed or stored in sdcard, in addition to the default model, you can pass an explicit parameter to CatDetect to use one of them.
dl::image::img_t img = {.data=DATA, .width=WIDTH, .height=HEIGHT, .pix_type=PIX_TYPE};
std::list<dl::detect::result_t> &res = detect->run(img);More details, see dl::image::img_t and dl::detect::result_t.
See Kconfig.
- CONFIG_FLASH_ESPDET_PICO_224_224_CAT
- CONFIG_FLASH_ESPDET_PICO_416_416_CAT
Whether to flash the model when model location is set to FLASH rodata or FLASH partition.
- CONFIG_ESPDET_PICO_224_224_CAT
- CONFIG_ESPDET_PICO_416_416_CAT
Default model to use if no parameter is passed to CatDetect.
- CONFIG_CAT_DETECT_MODEL_IN_FLASH_RODATA
- CONFIG_CAT_DETECT_MODEL_IN_FLASH_PARTITION
- CONFIG_CAT_DETECT_MODEL_IN_SDCARD
This component supports to load model from three different locations.
Note
- If model location is set to FLASH partition,
partition.csvmust contain a partition namedcat_det, and the partition should be big enough to hold the model file.
- CONFIG_CAT_DETECT_MODEL_SDCARD_DIR
When model locates in sdcard, you can change the model directory relative to the sdcard mount point.
The default value of this option is models/s3 for ESP32S3 and models/p4 for ESP32P4.
When using default value, just copy models folder to sdcard root directory.
Note
Do not change the model name when copy the models to sdcard.