|
2 | 2 |
|
3 | 3 | ## When do you need to migrate data
|
4 | 4 |
|
5 |
| -When you upload a new known image to the Face Collection, |
6 |
| -CompreFace uses a neural network model to calculate an embedding (also known as face features), |
7 |
| -which is basically an array of 512 or 128 numbers. |
8 |
| -Then CompreFace saves it to the database to use in the future comparison - when you upload a face to recognize, |
9 |
| -CompreFace again calculates an embedding and compares it to saved embeddings. |
10 |
| - |
11 |
| -The important thing here is that every neural network model will calculate different embeddings. |
12 |
| -It means that it makes sense to compare embeddings calculated by the same neural network model. |
13 |
| - |
14 |
| -CompreFace doesn't change the neural network model during its work, so normally you don’t need to migrate your face data. |
15 |
| -If you want to try [custom build](Custom-builds.md), be very careful - look at the table [here](../custom-builds/README.md), |
16 |
| -column `Face recognition model` - if the model changed, you need to run a migration. |
| 5 | +When you upload a new known image to the Face Collection, CompreFace |
| 6 | +uses a neural network model to calculate an embedding (also known as |
| 7 | +face features), which is an array of 512 or 128 numbers. Then CompreFace |
| 8 | +saves it to the database to use in the future comparison - when you |
| 9 | +upload a face to recognize, CompreFace again calculates an embedding and |
| 10 | +compares it to saved embeddings. |
| 11 | + |
| 12 | +The important thing here is that every neural network model calculates |
| 13 | +different embeddings. Therefore, it means that it makes sense to compare |
| 14 | +embeddings calculated by the same neural network model. |
| 15 | + |
| 16 | +CompreFace doesn't change the neural network model during its work, so |
| 17 | +you usually don't need to migrate your face data. If you want to try |
| 18 | +[custom build](Custom-builds.md), be very careful - look at the table |
| 19 | +[here](../custom-builds/README.md), column `Face recognition model` - if |
| 20 | +the model changed, you need to run a migration. |
17 | 21 |
|
18 | 22 | ## Limitations
|
19 | 23 |
|
20 |
| -If you run CompreFace in the [“not saving images to database” mode](Configuration.md)(`save_images_to_db=false`), |
21 |
| -you won’t be able to migrate data as the original images are required for migration. |
| 24 | +If you run CompreFace in the ["not saving images to database" |
| 25 | +mode](Configuration.md)(`save_images_to_db=false`), you won't be |
| 26 | +able to migrate data as the original images are required for migration. |
22 | 27 |
|
23 |
| -The only solution here is to delete all images from Face Collection and upload them again. |
| 28 | +The only solution here is to delete all images from Face Collection and |
| 29 | +upload them again. |
24 | 30 |
|
25 | 31 | ## How to perform a migration
|
26 | 32 |
|
27 |
| -Current migration was written for internal usage and wasn’t tested enough, so please do a backup copy of the database and perform migration at your own risk. |
| 33 | +Current migration was written for internal usage and wasn't tested |
| 34 | +enough, so please do a backup copy of the database and perform migration |
| 35 | +at your own risk. |
28 | 36 |
|
29 | 37 | REST request to start migration:
|
30 | 38 |
|
31 |
| -```shell |
32 |
| -curl -i -X POST \ |
33 |
| -'http://localhost:8000/api/v1/migrate' |
34 |
| -``` |
| 39 | + curl -i -X POST \ |
| 40 | + 'http://localhost:8000/api/v1/migrate' |
35 | 41 |
|
36 |
| -This rest endpoint is asynchronous, it will start the migration and return a response immediately. |
37 |
| -To understand if the migration is successful, please look at logs for “Migration successfully finished” text. |
| 42 | +This rest endpoint is asynchronous; it starts the migration and returns |
| 43 | +a response immediately. Please look at logs for "Migration successfully |
| 44 | +finished" text to understand if the migration is successful. |
0 commit comments