exadel-inc / exadel-inc/CompreFace

'List of All Saved Examples of the Subject' API returns all subjects, not only the one specified

Open
#721 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I want to list all samples of a subject and I use the CompreFace API to do so.
I use the API from https://documenter.getpostman.com/view/17578263/UUxzAnde#2febdce6-c451-4cc4-b3d3-c1c4b20c5fe7
The result lists **all** known subjects, not only the one specified in the 'subject' filter/param of the request

**To Reproduce**
With curl command and the "Demo app" API key "00000000-0000-0000-0000-000000000002".
curl --location -g --request GET "http://localhost:8000/api/v1/recognition/faces?page=0&size=20&subject=Brad%20Pitt" --header "x-api-key: 00000000-0000-0000-0000-000000000002"

**Expected behavior**
The command should return only "Brad Pitt" sample images
curl --location -g --request GET "http://localhost:8000/api/v1/recognition/faces?page=0&size=20&subject=Brad%20Pitt" --header "x-api-key: 00000000-0000-0000-0000-000000000002"
{
"faces" : [ {
"image_id" : "6981f1d6-4aad-4b38-a90c-11a9a47890c7",
"subject" : "Brad Pitt"
} ],
"page_size" : 20,
"page_number" : 0,
"total_elements" : 20,
"total_pages" : 1
}

**Screenshots**
curl --location -g --request GET "http://localhost:8000/api/v1/recognition/faces?page=0&size=20&subject=Brad%20Pitt" --header "x-api-key: 00000000-0000-0000-0000-000000000002"
{
"faces" : [ {
"image_id" : "fa728885-c7d5-492e-8051-9bb9daf4aeb0",
"subject" : "Matthew McConaughey"
}, {
"image_id" : "6981f1d6-4aad-4b38-a90c-11a9a47890c7",
"subject" : "Brad Pitt"
}, {
"image_id" : "efc99f02-0148-43d5-8d7a-cb734c903f6d",
"subject" : "Eddie Redmayne"
}, {
"image_id" : "c845b8fa-4135-425c-8370-dfc81f243466",
"subject" : "Jared Leto"
}, {
"image_id" : "6a1bfb01-b1e3-4989-a8e1-0b7ccf75e4a6",
"subject" : "Johnny Depp"
}, {
"image_id" : "0d28ac62-3386-4be4-a5b2-c6854615a8db",
"subject" : "Leonardo DiCaprio"
}, {
"image_id" : "b8a400f9-8d2d-4679-9183-8bff3921b5a4",
"subject" : "Mahershala Ali"
}, {
"image_id" : "c6af9101-fa76-4335-b8ac-ad17e864519c",
"subject" : "Rami Malek"
}, {
"image_id" : "0561aecf-c6b2-4238-815e-724a2002383c",
"subject" : "Robert John Downey"
}, {
"image_id" : "35f2dc48-3caa-4914-bdf2-a4094aa2603a",
"subject" : "Will Smith"
}, {
"image_id" : "48b31b33-a86c-4306-83cc-3c908c97d458",
"subject" : "Emma Stone"
}, {
"image_id" : "f6190ef9-2141-4fa0-8b60-f6fe4d17beb7",
"subject" : "Jennifer Lawrence"
}, {
"image_id" : "ab7d0dc4-ef29-491f-baae-04ff52eebc48",
"subject" : "Julia Roberts"
}, {
"image_id" : "b88f4b8e-7bcf-473b-8696-9117091af7b7",
"subject" : "Monica Bellucci"
}, {
"image_id" : "f52e8eb3-7c09-46a5-ab53-fd05abdf1dc9",
"subject" : "Natalie Dormer"
}, {
"image_id" : "63087a40-41a6-4797-bd30-525984b17c5f",
"subject" : "Natalie Portman"
}, {
"image_id" : "50160d1a-8e99-43f9-8f64-0ca0af93439f",
"subject" : "Nathalie Emmanuel"
}, {
"image_id" : "37a1287d-5ed7-4c00-a135-3e57b90ba638",
"subject" : "Penélope Cruz"
}, {
"image_id" : "73a63e61-205d-47bb-b677-4470e3b477b9",
"subject" : "Regina King"
}, {
"image_id" : "29e89e40-e720-4aad-9cb8-305748353587",
"subject" : "David Beckham"
} ],
"page_size" : 20,
"page_number" : 0,
"total_elements" : 20,
"total_pages" : 1
}

**Desktop (please complete the following information):**
- OS: Windows 10
- Browser: cURL commandline
- Version: 10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.