Data Cleanup

Smartface Platform allows you to manage the deletion of captured data in the databases.

This process will not touch any data related to watchlist/watchlist members.


You are able to configure cleanup based on:

  • maximum number of frames you want to keep in the database

  • maximum number of days you want to store frames in the database

Additionally you can configure:

  • time of the day when cleanup process should be started

  • whether you want to delete only image data of processed (full frames, crop images of detected faces/pedestrians) or you want to delete both SQL and image data

  • deletion of matchresults for faces that are no longer in SQL database.


DB cleanup process can be set via /api/v1/Setup/DbCleanup endpoint.

Example of the enabled DBcleanup process below starts at 2am every day. The frames older than 14 days will be deleted.

{
"enabled": true,
"maxFramesCount": null,
"maxImageDataAge": 14,
"cleanupStart": "02:00:00",
"cleanupAmount": null,
"deleteSql": true,
"deleteMatchResults": true
}


Configuration properties for cleanup are described in more detail in table below:

Property name

Property type

Property summary

Valid values

Default value

MaxFramesCount

integer or null

The maximum number of Frames to keep in database (oldest frames are deleted first).

If DeleteSql option is disabled, only blob/image data of these frames will be deleted, SQL data will stay in database.

Greater than zero or null


MaxImageDataAge

integer or null

Specifies maximum time (in days) to keep frames in database. E.g. when set to 7, all data older than 7 days will be deleted.

If DeleteSql option is disabled, only blob/image data of these frames will be deleted, SQL data will stay in database.

Greater than zero or null


CleanupStart

TimeSpan or null

CleanupStart defines the time of the day when cleanup should be performed (in UTC).

Example value: “01:00:00“ which means cleanup will be performed at 1 AM of UTC time.

Time of the day in “HH:MM:SS format“ or null


CleanupAmount

integer or null

Deprecated



DeleteSql

bool or null

If set to true, cleanup will delete all data related frames from SQL and NoSQL database.

If set to false, cleanup will delete only image data of related frames (full frames, crop images of detected faces/pedestrians). SQL data will be persisted.

true/false

false

DeleteMatchResults

bool or null

A boolean value indicating whether to also delete match results for faces that are no longer in database.

true/false

false