Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59
Sunday, October 22, 2017
 

Search by face

Face detection as back-end service uses http://face.com provided API. As search handler sphinx is used.

 

Configuring face search parameters

'face_search' => array (
        'api_key' => 'face_com_api_key',
        'api_secret' => 'face_com_secret_key',
        'enabled' => false,
        'delay_index' => true,
        'delay_index_portion' => 10,
        'request_delay' => 200,
        'use_full_size' => false
),

 

  • api_key - face.com application api_key
  • api_secret - face.com application secret key
  • enabled - by default face_search module is disabled, to activate it write true.
  • delay_index - by default indexing is in delay mode, if you want that each image would be indexed during every upload set to it false.
  • delay_index_portion - how many images index during cronjob run. It's run with standard gallery cronjob.
  • request_delay - at the current moment while implementing face.com api there was 5000 Q/H limit. To avoid limiting this limit we set 200 milisecond timeout within each request. It can be increased or lowered depending on gallery configuration.
  • use_full_size - by default then we make request to face.com api we use normal size image variation. In most cases it's sufficient. But if you want that we send original image url, you can set this to true.

 

Required changes regarding sphinx configuration

There are two views for sphinx

 

First one is used with extended color search and second one standard search.

Magic search keywords then using face search feature

  • (woman|womens|women|female|females) - all matches women presented in image
  • (glasses) - matches images where people are with glasses
  • (man|men|mens|male|males) - all matches where images contains man face
  • (smiling|smile) - matches photos where people are smiling.

All these keywords can be combined altogether. Some examples.

  • woman smiling - standard keyword + she must smile :)

Ex. http://celeb-face.com/gallery/search?doSearch=&SearchText=woman+smiling

  • alize smiling - alize smiling + she must smile :)

Ex. http://celeb-face.com/gallery/search?doSearch=&SearchText=alize+smiling

  • alize smiling glasses - alize smiling + she must smile and have glasses on :)

Ex. http://celeb-face.com/gallery/search?doSearch=&SearchText=alize+smiling+glasses

  • woman man smiling - woman and man are on the photo and they should smile.

Ex. http://celeb-face.com/gallery/search?doSearch=&SearchText=woman+man+smiling

  • glasses - find all photos where faces have glasses

Ex. http://celeb-face.com/gallery/search?doSearch=&SearchText=glasses

  • alize smiling plus dominant color is red

Ex. http://celeb-face.com/gallery/search/(keyword)/alize+smiling+glasses/(color)/55

Amazing is't ? :) Let me know in the comments :)

Back »

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name
     
     
     
     
 
About HPPG

High performance photo gallery dedicated for large numbers of image storage.

Get in touch

Donate



Download