.. _biometric-methods_v3: Multi-Object API Methods v3 =================================== .. rubric:: In this section: .. contents:: :local: .. _detect-post_v3: Detect Methods -------------------- Detect Objects on the Photo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: POST /v3/detect This method detects an object in a provided image and returns coordinates of the rectangle around the object (a.k.a. bbox) and the object orientation. .. note:: Object detection is done by the ``extraction-api`` component, so the ``sf-api`` component formats your initial request and forwards it to ``extraction-api``. .. rubric:: Query string parameters: * ``detector``: string, object detector to be applied to the image (see objects in the ``extraction-api`` configuration file). * ``cache``: boolean, if true, the formatted request to ``extraction-api`` will include such feature vectors as ``face_emben``, ``body_emben``, ``car_emben`` and ``need_normalized`` (obtain a normalized object image). The objects in ``extraction-api`` response will be saved in ``memcached`` under a ID. You can find this ID in the ``id`` field of the response. If not specified, the ``sf-api`` response will not contain feature vectors. * ``autorotate``: boolean, auto-rotates an original image to 4 different orientations and returns objects detected in each orientation. * ``roi``: string, a region of interest in the image, takes an array of integers in the format roi=top,left,right,bottom, (e.g. {"left": 0, "right": 1000, "top": 0, "bottom": 1000}). * ``return_emben``: boolean, returns a object feature vector in the response. Requires the enabled ``allow-return-facen`` flag in the ``sf-api`` configuration file. Requires the corresponding object in the ``sf-api`` configuration file in the ``objects`` section. * ``quality_estimator``: boolean, enables object quality estimation. * ``attribute``: array of strings in the format ``face_gender``, ``face_age``, ``face_emotions``, ``face_beard``, ``face_glasses3``, enables recognition of the object features passed in the array. .. tip:: To enable a boolean parameter (``cache``, etc.), use any of the following strings: ``1``, ``yes``, ``true``, or ``on``, in any letter case. .. rubric:: Parameters in request body: Image as a file of the ``image/jpeg``, ``image/png``, or ``image/webp`` MIME-type, or as a ``text/x-url`` link to a relevant public URL. .. rubric:: Returns: Returns a temporary object that can be stored in the cashe ``memcache``, ``redis``, or ``sf-api`` memory. It contains: * temporary ID of the detection result (``id``, if ``cache`` enabled); .. important:: When you form a request, be sure to check the relevance of the temporary ID before you refer to it as it tends to become irrelevant with time. If so, re-detect the object. * ``bbox``: list of coordinates of the rectangles around the detected objects; * ``score``: algorithm confidence in the result. * ``attributes`` (if passed): feature vector (if ``return_emben`` enabled) and attributes specified in the request parameters with extractor, model and result: * age (if ``face_age`` passed): number of years; * emotions (if ``face_emotions`` passed): 6 basic emotions + neutral (``angry``, ``disgust``, ``fear``, ``happy``, ``sad``, ``surprise``, ``neutral``) with algorithm confidence in each emotion expression; * gender (if ``face_gender`` passed): ``male`` or ``female``, with model and algorithm confidence in the result (``"confidence"``); * other attributes (if passed): beard (``beard``), glasses (``sun``, ``eye``, or ``none``), along with algorithm confidence in the result; * ``orientation``: EXIF orientation of the photo. .. rubric:: Examples .. rubric:: Request .. code:: curl -i -X POST 'http://127.0.0.1:18411/v3/detect?cache=on&attribute=face_gender&attribute=face_age&attribute=face_emotions&attribute=face_glasses3' -H 'Content-Type: image/jpeg' --data-binary @sample.jpg .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:BpLnfgDs Date: Thu, 23 May 2019 12:00:22 GMT Content-Length: 713 { "objects": { "face": [ { "id": "bjj8mlhjisgjrk6hj1v0", "bbox": {"left": 595, "top": 127, "right": 812, "bottom": 344}, "score": 0.9171224, "attributes": { "face_age": {"extractor": "face_age", "model": "age.v1", "result": 24}, "face_emotions": { "extractor": "face_emotions", "model": "emotions.v1", "result": [ {"confidence": 0.9998919, "name": "neutral"}, {"confidence": 9.195882e-05, "name": "sad"}, {"confidence": 1.4304824e-05, "name": "happy"}, {"confidence": 1.8077538e-06, "name": "surprise"}, {"confidence": 4.2787672e-08, "name": "angry"}, {"confidence": 2.0801991e-08, "name": "disgust"}, {"confidence": 1.9873138e-11, "name": "fear"} ] }, "face_gender": { "extractor": "face_gender", "model": "gender.v2", "result": [ {"confidence": 0.9999119, "name": "female"}, {"confidence": 8.809325e-05, "name": "male"} ] }, "face_glasses3": { "attribute": "face_glasses3", "model": "glasses3.v0", "result": [ {"confidence": 0.99958307, "name": "none"}, {"confidence": 0.00033243417, "name": "eye"}, {"confidence": 8.4465064e-05, "name": "sun"} ] } } } ] }, "orientation": 1 } Get Detection Result from the Cache by ID ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/detect/:id This method retrieves the detection results from the cache by their temporary ID (including feature vectors of the detected objects). .. rubric:: Parameters in path segments: * ``:id``: string, the detection result temporary ID in the cache. .. rubric:: Returns: JSON representation of the detection result. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X GET 'http://127.0.0.1:18411/v3/detect/bg2gu31jisghl6pee09g' .. rubric:: Response: .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:HlQBSnTu Date: Wed, 05 Dec 2018 07:51:04 GMT Content-Length: 477 { "face": { "id": "bjj8mlhjisgjrk6hj1v0", "bbox": {"left": 595, "top": 127, "right": 812, "bottom": 344}, "score": 0.9171224, "attributes": { "face_age": {"extractor": "face_age", "model": "age.v1", "result": 24}, "face_emotions": { "extractor": "face_emotions", "model": "emotions.v1", "result": [ {"confidence": 0.9998919, "name": "neutral"}, {"confidence": 9.195882e-05, "name": "sad"}, {"confidence": 1.4304824e-05, "name": "happy"}, {"confidence": 1.8077538e-06, "name": "surprise"}, {"confidence": 4.2787672e-08, "name": "angry"}, {"confidence": 2.0801991e-08, "name": "disgust"}, {"confidence": 1.9873138e-11, "name": "fear"} ] }, "face_gender": { "extractor": "face_gender", "model": "gender.v2", "result": [ {"confidence": 0.9999119, "name": "female"}, {"confidence": 8.809325e-05, "name": "male"} ] }, "face_glasses3": { "attribute": "face_glasses3", "model": "glasses3.v0", "result": [ {"confidence": 0.99958307, "name": "none"}, {"confidence": 0.00033243417, "name": "eye"}, {"confidence": 8.4465064e-05, "name": "sun"} ] } } } } Create Detection Result out of ``extraction-api`` Response ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: POST /v3/detect/premade This method creates a detection result out of a ``extraction-api`` response. Requires ``allow-return-facen: true`` in ``sf-api`` configuration file. .. rubric:: Parameters in path segments: The method doesn't accept any parameters. .. rubric:: Parameters in request body: Request body contains the object in a format similar to the response ``GET /v3/detect/:id: { "object type": object from the extraction-api response }`` .. rubric:: Returns: JSON with ``"id"`` on success. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X POST 'http://127.0.0.1:18411/v3/detect/premade' -H 'Content-Type: application/json' --data-binary '@extapi-face.json' .. rubric:: Response: .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:jFSBuSPm Date: Wed, 05 Dec 2018 08:08:56 GMT Content-Length: 2 {"id": "bg2gu31jisghl6peea9g"} Get Normalized Detect by ID ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/detect/:id/normalized This method retrieves normalized detect by ID. .. rubric:: Parameters in path segments: * ``:id``: ID. .. rubric:: Returns: Normalized object images on success. .. rubric:: Example .. rubric:: Request .. code:: curl -i 'http://127.0.0.1:18411/v3/detect/bg2gu31jisghl6pee09g/normalized' .. rubric:: Response: .. code:: HTTP/1.1 200 OK Content-Type: image/png X-Request-Id: SF:mjv3Lyvf Date: Thu, 09 Apr 2020 15:59:48 GMT Transfer-Encoding: chunked Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: " to save to a file. Compare Two Objects --------------------------- .. code:: GET /v3/verify This method compares a pair of objects (faces, bodies) and returns a probability of their belonging to the same person (a.k.a. similarity, or confidence). .. rubric:: Query string parameters: * ``"obj1"``: the first object, either a detection result (ID of the result from the ``POST /v3/detect`` method), or one from the biometric database (in the format ``persistent://`` or ``emben:[model:]`` if ``allow-return-facen:true`` ). * ``"obj2"``: the second object, from the same possible sources as the first object. .. rubric:: Returns: Algorithm confidence that the objects match. .. rubric:: Example .. rubric:: Request #1. Compare 2 detection results .. code:: curl -s 'http://127.0.0.1:18411/v3/verify?obj1=detection%3Acp1nh3k8kuic72tu0ljg%22&obj2=detection%3Acp1nh3k8kuic72tu0ljg%22' | jq .. rubric:: Response .. code:: { "confidence": 0.92764723 } .. rubric:: Request #2. Compare a detection result and a face from a gallery .. code:: curl -i 'http://127.0.0.1:18411/v3/verify?obj1=detection:bg2gu31jisghl6pee09g&obj2=persistent:face/history/4141715733352439863' | jq .. rubric:: Response .. code:: { "confidence": 0.999996 } Gallery Methods ---------------------- List Database Galleries ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/galleries/ This method returns the list of all galleries in the biometric database. .. rubric:: Parameters: The method doesn't accept any parameters. .. rubric:: Returns: JSON dictionary with the list of gallery names. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X GET 'http://127.0.0.1:18411/v3/galleries/' .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:BjI7i3GZ Date: Wed, 05 Dec 2018 08:19:55 GMT Content-Length: 125 { "galleries": { "face": [ { "objects": 22, "name": "history" }, { "objects": 1, "name": "test" }, { "objects": 0, "name": "hello" } ], "car": [ { "objects": 11, "name": "test" } ], "body": [ { "objects": 51, "name": "entrance" } ] } } .. _gallery-create-v3: Create a Gallery ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: POST /v3/galleries/:objtype/:gallery This method creates a gallery under a given name. .. rubric:: Parameters in path segments: * ``:objtype``: string, an object type. * ``:gallery``: string, a new gallery's name. It can contain English letters, numbers, underscore and minus sign (``[a-zA-Z0-9_-]+``) and must be no longer than 48 characters. * ``space``: name of the space in the tarantool, passed in the body. Optional parameter. * ``live_idx``: parameters for Live index in the tarantool, passed to the body. Optional parameter. .. rubric:: Returns: * Empty JSON on success. * JSON with a relevant error description on failure. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X POST 'http://127.0.0.1:18411/v3/galleries/face/hello' -d '{"space":"some_space_name"}' .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:whPaBcoV Date: Wed, 05 Dec 2018 08:16:20 GMT Content-Length: 2 {} If the gallery already exists, 409 will be returned. .. rubric:: Request .. code:: curl -i -X POST 'http://127.0.0.1:18411/v3/galleries/face/hello' .. rubric:: Response .. code:: HTTP/1.1 409 Conflict Content-Type: application/json X-Request-Id: SF:9S0gvzfM Date: Wed, 05 Dec 2018 08:15:00 GMT Content-Length: 62 { "code": "CONFLICT", "desc": "Gallery \"hello\" already exists" } Retrieve Gallery Details ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/galleries/:objtype/:gallery This method checks the existence of the gallery and request the number of objects in it. .. rubric:: Parameters in path segments: * ``:objtype``: string, an object type. * ``:gallery``: string, a gallery's name. .. rubric:: Returns: * JSON dictionary with the number of objects and gallery name on success. * JSON with a relevant error description on failure. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X GET 'http://127.0.0.1:18411/v3/galleries/face/hello' .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:Ard3exjn Date: Wed, 05 Dec 2018 08:17:54 GMT Content-Length: 29 {"name":"ffsec_face_events","emben_model":"kiwi_320","emben_size":320,"objects":474} Delete Gallery ^^^^^^^^^^^^^^^^^^^^ .. code:: DELETE /v3/galleries/:objtype/:gallery This method deletes the gallery and all the objects in it. .. rubric:: Parameters in path segments: * ``:objtype``: string, the name of the object to be deleted. * ``:gallery``: string, the name of the gallery to be deleted. .. rubric:: Returns: * Empty JSON dictionary on success. * JSON with a relevant error description on failure (404 if the gallery didn't exist). .. rubric:: Example .. rubric:: Request .. code:: curl -i -X DELETE 'http://127.0.0.1:18411/v3/galleries/face/hello' .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:oJh9FEtX Date: Wed, 05 Dec 2018 08:15:04 GMT Content-Length: 2 {} Rename the Gallery ^^^^^^^^^^^^^^^^^^^^ .. code:: PATCH /v3/galleries/:objtype/:gallery This method renames the gallery. .. rubric:: Parameters in path segments: * ``:objtype``: string, the name of the object to be renamed. * ``:gallery``: string, the name of the gallery to be renamed. .. rubric:: Parameters in request body: ``name``: string, new name of the gallery. .. rubric:: Returns: * Empty JSON dictionary on success. * JSON with a relevant error description on failure (409 if the target name is already occupied). .. rubric:: Example .. rubric:: Request .. code:: curl -i -X PATCH -d '{"name": "testgal2"}' -H "Content-Type: application/json" http://127.0.0.1:18411/v3/galleries/face/testgal1 .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:AAwdCxmM Date: Tue, 04 Feb 2020 08:10:15 GMT Content-Length: 2 {} List of galleries of a specific type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/galleries/:objtype .. rubric:: Parameters in path segments: * ``:objtype``: string, the name of the object. .. rubric:: Returns: * JSON dictionary of list of galleries of a specific type on success. * JSON with a relevant error description on failure. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X GET 'http://127.0.0.1:18411/v3/galleries/face/' .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:BjI7i3GZ Date: Wed, 05 Dec 2018 08:19:55 GMT Content-Length: 125 { "galleries": [ { "objects": 22, "name": "history" }, { "objects": 1, "name": "test" }, { "objects": 0, "name": "hello" } ] } Methods with Objects in the Gallery ------------------------------------------- Create an Object to Database ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: POST /v3/galleries/:objtype/:gallery/objects/:id This method takes a detected object from the cache or an object from a gallery. It then adds the object with its feature vector to a given gallery under a custom id. The custom id and destination gallery are to be specified in the path segments. Along with the object, you can also add metadata which uniquely describes the person, for example, the person's name. .. rubric:: Parameters in path segments: * ``:objtype``: string, the name of the object. * ``:gallery``: string, the name of the gallery to add the object in. * ``:id``: integer, permanent object id in the gallery, uint64. .. rubric:: Parameters in request body: * ``from``: identifier of the object serving as a source for the one being created: * ``detection:``– result of the detection. * ``persistent://`` – existing object in the gallery. * ``inline-detection`` – detection object attached to the request in the field detection. Available only when ``allow-return-facen`` is enabled. If the detector is not specified normalized, such an object cannot be migrated to a new model. * ``emben:[model:]`` – emben (with or without model) in base64. Available only when ``allow-return-facen`` is enabled. Creates incomplete objects that cannot be migrated between models. * ``meta`` [optional]: dictionary of meta-fields. * ``detection``: detection object similar to the one passed in ``POST /v3/detect/premade`` (only the object itself, without wrapping in ``{"object type": ...}``, because the type is already known). .. rubric:: Returns: * JSON representation of the added object on success. If the query-argument ``return_emben`` is passed and ``allow-return-facen`` is enabled in the configuration file, it will also return emben in the response field. If the query-argument ``return_full_meta`` is passed, it will return the full meta, including fields filled in from defaults. * Error on failure. .. rubric:: Example .. rubric:: Request .. code:: curl -i -X POST http://127.0.0.1:18411/v3/galleries/face/hello/objects/123/ -H 'Content-Type: application/json' --data-binary '@-' <`` value is returned in the response in the ``next_page`` parameter along with the previous page results (see details below). * ``ignore_errors``: By default, if one or several ``tntapi`` shards are out of service during object identification, ``sf-api`` returns an error. Enable this Boolean parameter to use available ``tntapi`` shards to obtain object identification results. * ``return_emben``: if ``allow_return_facen`` is enabled in config, return emben for each object in response. .. rubric:: Filters in query string parameters: * ``meta:in:meta1=val1&meta:in:meta1=val2&...``: select an objects if a meta string ``meta1`` is equal to one of the values ``val1``/ ``val2``/ ..., etc. (`uint64`, `string`). * ``meta:gte:meta1=val1``: select all objects with a meta string ``meta1`` greater or equal to ``val1`` (`uint64`). * ``meta:lte:meta1=val1``: select all objects with a meta string ``meta1`` less or equal to ``val1`` (`uint64`). * ``meta:subset:meta1=val1&meta:subset:meta1=val2&...``: select an object if a meta string ``meta_field`` contains all the values ``val1``, ``val2``, ..., etc. (`[]string`). * ``id:in=value_id``: select all objects with ``id`` equal to ``value_id``. * ``id:gte=value_id``: select all objects with ``id`` greater or equal to ``value_id``. * ``id:lte=value_id``: select all objects with id less or equal to ``value_id``. * ``looks_like=0.75=detection:bg2gu31jisghl6pee09g``: select if object is similar to detection ``bg2gu31jisghl6pee09g`` with confidence not lower than 0.75. * ``looks_like=0.78=persistent:face/hello/123``: select if the object looks like face ``123`` from gallery ``hello`` with a confidences not lower than 0.78. * ``looks_like=0.81=emben:[model:]``: select if the object is similar to the passed feature vector with a confidences not lower than 0.81. Available only if ``allow-return-facen`` is enabled. * ``meta:like:meta1=val1%``: ~sql like: any combination of characters and % sign is supported, e.g. 'aa%', '%aa', '%aa%' or even '%aa%bb%'. That is, '%' is treated as 'any number of any characters'. For data type ``array/list`` - if any of the values passed the check. Always properly escape ``%``. * ``meta:ilike:meta1=Val1%``: case-insensitive analogue of ``meta:like`` filter. Do not forget that emben is encoded ``base64.StdEncoding`` and may contain characters ``=``. Always properly escape your emben. You can only set one similarity filter in one query (several are BAD_PARAM). If you set ``looks_like``, the default sort will automatically switch to -confidence. .. rubric:: Returns: JSON representation of an array with found objects. The response format is the following: .. code:: HTTP/1.1 200 OK Content-Type: application/json Content-Length: [...] { "objects": [ { ... object 1 data ... "confidence": 0.123 // if a similarity filter was specified }, { ... object 2 data ... "confidence": 0.123 // if a similarity filter was specified }, ... ], "next_page": "vgszk2bkexbl" // next page cursor } The ``next_page`` parameter is a URL-safe string that you will have to pass in the ``?page=`` in the next request in order to get the next page of results. Pagination is available only if the filtration by feature vector is disabled. .. rubric:: Example .. rubric:: Request #1. .. code:: curl -i -X GET http://127.0.0.1:18411/v3/galleries/face/history/objects/?limit=5&meta:in:camera=openspace&meta:in:camera=entrance&meta:lte:timestamp=1543845934&meta:gte:timestamp=1514801655&looks_like=0.4=detection:bg2gu31jisghl6pee09g .. rubric:: Response .. code:: HTTP/1.1 200 OK Content-Type: application/json X-Request-Id: SF:ibKVYpcb Date: Wed, 05 Dec 2018 08:37:33 GMT Transfer-Encoding: chunked { "objects": [ { "confidence": 0.6026, "id": { "type":"face", "object": 4141715030051545133, "gallery": "history" }, "meta": { "bbox": "[607, 802, 738, 933]", "camera": "openspace", "is_friend": 0, "labels": [], "score": 9999999999998079040, "timestamp": 1542909082 } }, { "confidence": 0.5325, "id": { "type":"face", "object": 4141715086422990894, "gallery": "history" }, "meta": { "bbox": "[741, 905, 953, 1117]", "camera": "openspace", "is_friend": 0, "labels": [], "score": 9999999999993877300, "timestamp": 1542909103 } }, { "confidence": 0.531, "id": { "type":"face", "object": 4141716493024780347, "gallery": "history" }, "meta": { "bbox": "[90, 869, 166, 945]", "camera": "openspace", "is_friend": 0, "labels": [], "score": 10000000000000000013, "timestamp": 1542909627 } }, { "confidence": 0.5236, "id": { "type":"face", "object": 4141716498393489468, "gallery": "history" }, "meta": { "bbox": "[56, 853, 125, 923]", "camera": "openspace", "is_friend": 0, "labels": [], "score": 9999999999999999053, "timestamp": 1542909629 } }, { "confidence": 0.5212, "id": { "type":"face", "object": 4141715338752319538, "gallery": "history" }, "meta": { "bbox": "[-36, 862, 60, 958]", "camera": "openspace", "is_friend": 0, "labels": [], "score": 9999999999999999425, "timestamp": 1542909197 } } ], "next_page": "There are more than 5 results, but pagination is not supported when filtering by emben" } .. rubric:: Request #2. .. code:: curl -s -X GET http://127.0.0.1:18411/v3/galleries/face/hello/objects/\?limit\=1\&meta:like:camera\=%25pace\&meta:ilike:labels\=FO%25 .. rubric:: Response .. code:: { "objects": [ { "id": { "type": "face", "gallery": "hello", "object": 123 }, "meta": { "camera": "openspace", "labels": [ "foo", "bar" ], } } ] } Get a Normalized Objects Image from the Gallery ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code:: GET /v3/galleries/:objtype/:gallery/objects/:id/normalized .. rubric:: Parameters in path segments: * ``:objtype``: string, the name of the object. * ``:gallery``: string, the gallery's name. * ``:id``: object id in the gallery, uint64. .. rubric:: Returns: Returns Header ``location`` and ``text/plain`` with a link to the normalized photo (storage link from ``normalized-storage`` config). Successful response is available only if ``normalized-storage.enabled`` is enabled in config. .. rubric:: Example .. rubric:: Request .. code:: curl -vvv http://localhost:18411/v3/galleries/face/hello/objects/1234/normalized .. rubric:: Response .. code:: HTTP/1.1 302 Found Content-Type: text/plain Location: http://127.0.0.1:3333/uploads/ZmFjZTpoZWxsbw==/6c/df/1234_cf7umjq92d3l006ou0rg.png X-Request-Id: SF:Edz0ThbX Date: Tue, 24 Jan 2023 14:37:39 GMT Content-Length: 87 http://127.0.0.1:3333/uploads/ZmFjZTpoZWxsbw==/6c/df/1234_cf7umjq92d3l006ou0rg.png Get Models Information ---------------------------------- .. code:: GET /v3/models-info .. rubric:: Parameters in path segments:: The method doesn't accept any parameters. .. rubric:: Returns: Returns information about available (i.e. enabled) detectors, normalizers, extractors and objects in ``extraction-api``. .. rubric:: Example .. rubric:: Request .. code:: curl -s http://localhost:18411/v3/models-info | jq .. rubric:: Response .. code:: { "detectors": { "body": { "object_types": [ "body" ] }, "car": { "object_types": [ "car" ] }, "gustav_body": { "object_types": [ "body" ] }, "gustav_car": { "object_types": [ "car" ] }, "headbodyface": { "object_types": [ "head", "body", "face" ] }, "license_plate": { "object_types": [ "license_plate" ] }, "license_plate_gustav_accurate": { "object_types": [ "license_plate" ] }, "shiloette": { "object_types": [ "body" ] } }, "normalizers": { "carlicplate": { "normalization_type": "carlicplate" }, "cropbbox": { "normalization_type": "cropbbox" }, "norm200": { "normalization_type": "norm200" } }, "extractors": { "car_color": { "normalization": "crop1x", "model_name": "carattr_color.v0" }, "car_quality": { "normalization": "cropbbox", "model_name": "carattr.quality.v0" }, "face_emben": { "normalization": "norm200", "model_name": "kiwi_160" }, "face_quality": { "normalization": "crop1x", "model_name": "quality_fast.v1" }, "license_plate_quality": { "normalization": "cropbbox", "model_name": "carlicplateattr.quality.v0" } }, "objects": { "car": { "quality_attribute": "car_quality", "base_normalizer": "cropbbox" }, "face": { "quality_attribute": "face_quality", "base_normalizer": "crop2x" }, "license_plate": { "quality_attribute": "license_plate_quality", "base_normalizer": "carlicplate" } } }