person_reid

Example of the component espressif/esp-dl v3.3.8
[supported]: https://img.shields.io/badge/-supported-green "supported"

| Chip     | ESP-IDF v5.3           | ESP-IDF v5.4           |
|----------|------------------------|------------------------|
| ESP32-S3 | ![alt text][supported] | ![alt text][supported] |
| ESP32-P4 | ![alt text][supported] | ![alt text][supported] |

# Person ReID Example

A simple image inference example. See full example in [esp-who](https://github.com/espressif/esp-who/tree/master/examples).

## Quick start

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:

```
I (3069) person_reid: id: 1, sim: 0.519167
I (3669) main_task: Returned from app_main()
```
## Configurable Options in Menuconfig

### Component configuration
We provide the models as components, each of them has some configurable options. This example includes two models, one for pedestrian detection and another for person reid feature extraction. See 

- [Pedestrian Detect Model](https://github.com/espressif/esp-dl/blob/master/models/pedestrian_detect/README.md)
- [person ReID Model](../../models/person_reid/README.md)

### Project configuration

- CONFIG_PARTITION_TABLE_CUSTOM_FILENAME

If model location is set to FLASH partition, please set this option to `partitions2.csv`

- CONFIG_DB_FATFS_FLASH
- CONFIG_DB_FATFS_SDCARD
- CONFIG_DB_SPIFFS

We extracts person reid feature and saves them to a database. Three different types of file system for database is supported. 

> [!NOTE]  
> - fatfs_flash and spiffs save features to a 1MB flash partition named `storage`. It's defined in `partitions.csv` and `partitions2.csv`.
> - fatfs_sdcard save features to sdcard. 
> - Each feature consumes 2050 bytes, including 2 bytes for id and 1024??? bytes for feature data. 

To create a project from this example, run:

idf.py create-project-from-example "espressif/esp-dl=3.3.8:person_reid"

or download archive (~281.15 KB)