Regim

FREEMIUM
By vaRDas | Updated a month ago | Visual Recognition
Popularity

8.7 / 10

Latency

4,376ms

Service Level

100%

Health Check

N/A

Followers: 8
API Creator:
Rapid account: Va R Das
vaRDas
rekinm-lnlYQT00U1z
Log In to Rate API
Rating: 2.7 - Votes: 3

README

Dominant colors

Getcolors endpoint (https://regim3.p.rapidapi.com/colors/1.1/) able to determine dominant (main) colors on image.
Options can be used for optimizing expected result:
alg - select fast or fine algorithm. Fast doesnโ€™t mean bad ๐Ÿ˜ƒ but is some cases you can get better results with slower option.
closestColor - allow to map detected colors to palette (find most similar color from given list) and organize your images with colors gpoups, sort or search gallery.

Parameter palette is optional and you can provide your oun colors set except default palette.

For testing Colors api you can use Colab
https://colab.research.google.com/drive/1SE26l6aVgbazUeNGpY5huNXhB0hOsc7A?usp=sharing

Objects and Faces recognition

Regim API (https://regim3.p.rapidapi.com/1.1/) recognize object and segments on image.
Additionally it returns some extra data like EXIF, geodecoding. Result image with object labels can be prepeared with โ€˜resimgโ€™ option.
Use our API to label your images, fulfill your gallery with searchable data (labels, geodata, shot info from EXIF and other).

As example: this api is a part of our photo gallery with search, persons catalogue and slide show. Most common usage:

  • search request like โ€˜Italy 2015โ€™ -> get all photos from Italy vacations -> start fullscreen slideshow.
  • search request like โ€˜person: Annโ€™ -> get all photos with Ann -> start fullscreen slideshow. (API for face comparition used to prepare persons catalogue)

Please fill free to contact with any questions.

Input:

Image file and options:
Possible options (put them with comma delimeter):

  • segmentation - recognize objects and segments. Api returns objects with score > 0.5
  • resimg - return image with object labels (as base64 string, resized to 1000px)
  • facerecognition - search faces, return face location (top, left, right, bottom) and face image (as base64 string)
  • exif - exif data (some fields like MakesNote will not decoded)
  • autorotation - rotate image according exif data before object recognition. Use it to increase recognition quality. Also you can check on resulted image if rotation works fine.
  • geodata - decode coordinates from exif (coordinates and country, city, street and other info based on OSM data)
  • colors - dominant colors (as hex code) - works as is ๐Ÿ˜ƒ

Output

based on options:
Objects, segments, exif data, geo data, faces.

  • check examples section

Note

  • Image size should not exceed 20 MB (it will be resized to 1000px to increase analisys speed). Preffered to resize image before sending to speedup data transfer, but resizing can drop exif data.
  • Each option takes some execution resources and time - select only needed options. Segmentation is the most resource-intensive operation.

cUrl example:

curl --request POST --url 'https://regim3.p.rapidapi.com/1.1/?opts=facerecognition,exif' --header 'content-type: multipart/form-data' --header 'x-rapidapi-host: regim3.p.rapidapi.com' --header 'x-rapidapi-key: yourKey' --form file=@img.jpg

Python3 example:

import requests

url = "https://regim3.p.rapidapi.com/1.1/"

querystring = {"opts":"segmentation,facerecognition"}


payload = {"file": open('img.jpg', 'rb')}
headers = {
        'x-rapidapi-host': "regim3.p.rapidapi.com",
        'x-rapidapi-key': "yourKey",
        'accept' : "application/json"
        }

response = requests.post(url, files=payload, headers=headers, params=querystring)

print(response.text)