Giter VIP home page Giter VIP logo

rekognition_ios_sdk's Introduction

Current Version: 2.0

Updates:

  1. Implemented FaceThumbnailCropper and UIImageRotationFixer that serve as helper classes for ReKognitionSDK.

    FaceThumbnailCropper crops face thumbnails out of the raw image, merges thumbnails into a single compressed image, and serves that image as the source for ReKognition API.

    UIImageRotationFixer rotates the underlining CGImageRef of an UIImage to its up un-mirrored position. It is used to correct the source images whose orientation is other than upwards, like images taken from camera roll.

  2. ReKognitionResults provides data classes and parsing methods for ReKognition API response.


This ReKognition iOS SDK is intent for developers who want to integrate ReKognition API into their iOS applications. The folder contains our ReKognition iOS SDKs (ReKognitionSDK.h and ReKognitionSDK.m under folder named SDK) and a simple example to demo the SDK. For more information about our ReKognition API, please read our documentation.

ReKognitionSDK class contain the following functions:

To customize your own recognition functions:

+ (NSData *)postReKognitionJobs:(NSDictionary *)jobsDictionary;

ReKognition Face Detect Function (if not set, jobs is face_aggressive by default)

+ (RKFaceDetectResults *)RKFaceDetect:(UIImage*)image
                                 jobs:(NSString *)jobs;            // optional: "face_aggressive"
+ (RKFaceDetectResults *)RKFaceDetectWithUrl:(NSURL *)imageUrl
                                        jobs:(NSString *)jobs;     // optional: "face_aggressive"

ReKognition Face Add Function

+ (RKFaceDetectResults *)RKFaceAdd:(UIImage*)image
                         nameSpace:(NSString *)name_space          // optional
                            userID:(NSString *)user_id             // optional
                               tag:(NSString *)tag                 // optional
                              jobs:(NSString *)jobs;               // optional: "face_add"

+ (RKFaceDetectResults *)RKFaceAddWithUrl:(NSURL *)imageUrl
                                nameSpace:(NSString *)name_space  // optional
                                   userID:(NSString *)user_id     // optional
                                      tag:(NSString *)tag         // optional
                                     jobs:(NSString *)jobs;       // optional: "face_add"

ReKognition Face Train Function

+ (RKBaseResults *)RKFaceTrain:(NSString *)name_space        // optional
                        userID:(NSString *)user_id           // optional
                          tags:(NSArray *)tags;              // optional

ReKognition Face Cluster Function

+ (RKFaceClusterResults *)RKFaceCluster:(NSString *)name_space      // optional
                                 userId:(NSString *)user_id         // optional
                         aggressiveness:(NSNumber *)aggressiveness; // optional: 40

ReKognition Face Crawl Function

+ (RKFaceCrawlResults *)RKFaceCrawl:(NSString *)fb_id
                       access_token:(NSString *)access_token
                        crawl_fb_id:(NSArray *)friends_ids
                          nameSpace:(NSString *)name_space        // optional
                             userID:(NSString *)user_id;          // optional

ReKognition Face Recognize Function

+ (RKFaceDetectResults *)RKFaceRecognize:(UIImage *)image
                               nameSpace:(NSString *)name_space    // optional
                                  userID:(NSString *)user_id       // optional
                                    jobs:(NSString *)jobs          // optional: "face_recognize"
                              num_return:(NSNumber *)num_return    // optional: 3
                                    tags:(NSArray *)tags;          // optional

+ (RKFaceDetectResults *)RKFaceRecognizeWithUrl:(NSURL *)imageUrl
                                      nameSpace:(NSString *)name_space     // optional
                                         userID:(NSString *)user_id        // optional
                                           jobs:(NSString *)jobs           // optional: "face_recognize"
                                     num_return:(NSNumber *)num_return     // optional: 3
                                           tags:(NSArray *)tags;           // optional

ReKognition Face Visualize Function

+ (RKFaceVisualizeResults *)RKFaceVisualize:(NSArray *)tags                       // optional
                                       jobs:(NSString *)jobs                      // optional: "face_visualize_show_default_tag"
                                  nameSpace:(NSString *)name_space                // optional
                                     userID:(NSString *)user_id                   // optional
                             num_tag_return:(NSNumber *)num_tag_return            // optional
                      num_img_return_pertag:(NSNumber *)num_img_return_pertag;    // optional

ReKognition Face Search Function

+ (RKFaceDetectResults *)RKFaceSearch:(UIImage *)image
                                 jobs:(NSString *)jobs                 // optional: "face_search"
                            nameSpace:(NSString *)name_space           // optional
                               userID:(NSString *)user_id              // optional
                           num_return:(NSNumber *)num_return           // optional
                                 tags:(NSArray *)tags;                 // optional

+ (RKFaceDetectResults *)RKFaceSearchWithUrl:(NSURL *)imageUrl
                                        jobs:(NSString *)jobs          // optional: "face_search"
                                   nameSpace:(NSString *)name_space    // optional
                                      userID:(NSString *)user_id       // optional
                                  num_return:(NSNumber *)num_return    // optional
                                        tags:(NSArray *)tags;          // optional

ReKognition Face Delete Function

+ (RKBaseResults *)RKFaceDelete:(NSString *)tag                  // optional
                     imageIndex:(NSArray *)img_index_array       // optional
                      nameSpace:(NSString *)name_space           // optional
                         userID:(NSString *)user_id;             // optional

ReKognition Face Rename Function

+ (RKBaseResults *)RKFaceRenameOrMergeTag:(NSString *)oldTag
                                  withTag:(NSString *)newTag
                            selectedFaces:(NSArray *)img_index_array     // optional
                                nameSpace:(NSString *)name_space         // optional
                                   userID:(NSString *)user_id;           // optional

ReKognition Face Stats Function

+ (RKNameSpaceStatsResults *)RKNameSpaceStats;

+ (RKUserIdStatsResults *)RKUserIdStats:(NSString *)name_space;

ReKognition Scene Understadning Function

+ (RKSceneUnderstandingResults *)RKSceneUnderstanding:(UIImage *)image;

+ (RKSceneUnderstandingResults *)RKSceneUnderstandingWithUrl:(NSURL *)imageUrl;

Configuration:

  1. Click here to register a ReKognition account, and you will receive the API key and secret by email.

  2. Use your own API Key and Secret in RekognitionSDK.

static NSString *API_Key = @"YOUR_API_KEY";
static NSString *API_Secret = @"YOUR_API_SECRET";

Demo:

This demo app allows you to perform the following tasks:

  • Select a photo from the album or take a picture using the camera;

  • Recognize the image using the our face detection and scene understanding functions;

Notes: the demo app shows the proper usage of FaceThumbnailCropper and UIImageRotationFixer helper classes.

For any questions, please contact [email protected]

rekognition_ios_sdk's People

Contributors

kh156 avatar

Stargazers

Kevin Li avatar

Watchers

James Cloos avatar Arvin Li avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.