flovv / Roxford

R Package for Image Recognition with Project Oxford
26 stars 13 forks source link

is Roxford still valid? #2

Closed MarcinKosinski closed 7 years ago

MarcinKosinski commented 7 years ago

The www.projectoxford.ai/ redirects to the https://azure.microsoft.com/en-us/services/cognitive-services/ where after launching a free 30 days trial you only have subscriptions key.

Is this R packages suppose to work with https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1ff ?

I remember using this package few months ago and this was a great way to use the microsoft computer vision api, but I can no longer get vision_keys. Thanks @flovv for the great package and thanks for the help in the advance.

flovv commented 7 years ago

I just logged in using the free trial. Apparently MS changed some parts. However after login I got a new vision key. Using the new key I got a response - at least not an error- however they also seem to have changed the json... So no error but the response is currently empty.

MarcinKosinski commented 7 years ago

Yeah, I logged from other URL and got the vision key for which I am getting empty responses also. Does this vision key work for you in the web application here - https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1ff (you can send requests via the browser).

flovv commented 7 years ago

It is very strange. a) they changed the API endpoints. I changed that in the package. b) the keys that I get from their page do not seem to work in both the: web interface as well as the package.

Potentially one must set up a real account with credit card, etc. Which I have not tried yet.

MarcinKosinski commented 7 years ago

b) the keys that I get from their page do not seem to work in both the: web interface as well as the package.

Same for me.

Nybre commented 7 years ago

Hi flovv,

Cant almost the same thing your shiny server script/shiny app be done using https://github.com/IndicoDataSolutions/IndicoIo-R ?

MarcinKosinski commented 7 years ago

@Brianic the URL you have provided is the indico's company API where Roxford package is a hook to Microsoft Computer Vision API. So this is not the same.

About which shiny server script are you talking here?

Nybre commented 7 years ago

@MarcinKosinski Thanks for clearing that out.

So given this

The www.projectoxford.ai/ redirects to the https://azure.microsoft.com/en-us/services/cognitive-services/ where after launching a free 30 days trial you only have subscriptions key.

Is this R packages suppose to work with https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1ff ?

Does that mean this package no longer works? I am a bit new to this so sorry if am asking "stupid" questions.

With regards to the shiny script i was referring to this:

https://github.com/flovv/Roxford/blob/master/image-shiny/server.R

Thanks for your time mate

MarcinKosinski commented 7 years ago

So far it looks like the whole Microsoft API doesn't work. This package works, but gives empty results since the API isn't valid.

flovv commented 7 years ago

I rerun the test. The API is up again and the package works. This page shows which server regions work: https://azure.microsoft.com/de-de/pricing/details/cognitive-services/face-api/

US- West worked for me with the following call: Roxford::getFaceResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", facekey)

MarcinKosinski commented 7 years ago

Great news @flovv !

MarcinKosinski commented 7 years ago

Yeah it was unavailable in the west europe (and still is). I'll try to use the US api. Do you somehow specify region in new calls to the Roxford?

flovv commented 7 years ago

yes, it is not yet documented;

getFaceResponse <- function(img.path, key, region="westus")

however the default is westus anyways....

MarcinKosinski commented 7 years ago

I take the key from https://azure.microsoft.com/en-us/try/cognitive-services/my-apis/

api

but can't connect with the tagging api

getDescriptionResponseURL(banner, key1, region = 'westus')
getTaggingResponseURL(banner, key2, region = 'westus')

(where key1 and key2 are taken from the screen shoot).

I get this response

> getTaggingResponseURL(banner, key2, region = 'westus')
No encoding supplied: defaulting to UTF-8.
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
data frame with 0 columns and 2 rows
> getDescriptionResponseURL(banner, key1, region = 'westus')
No encoding supplied: defaulting to UTF-8.
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
data frame with 0 columns and 2 rows

and in the session info you can see that I have installed your package today from GitHub

> session_info()
Session info --------------------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.3 (2017-03-06)
 system   x86_64, mingw32             
 ui       RStudio (1.0.136)           
 language (EN)                        
 collate  Polish_Poland.1250          
 tz       Europe/Warsaw               
 date     2017-06-08                  

Packages ------------------------------------------------------------------------------------------------------------------------------------------------------
 package  * version date       source                        
 curl       2.4     2017-03-24 CRAN (R 3.3.3)                
 devtools * 1.12.0  2016-06-24 CRAN (R 3.3.3)                
 digest     0.6.12  2017-01-27 CRAN (R 3.3.3)                
 git2r      0.18.0  2017-01-01 CRAN (R 3.3.3)                
 httr     * 1.2.1   2016-07-03 CRAN (R 3.3.3)                
 jsonlite   1.4     2017-04-08 CRAN (R 3.3.3)                
 memoise    1.0.0   2016-01-29 CRAN (R 3.3.3)                
 plyr     * 1.8.4   2016-06-08 CRAN (R 3.3.3)                
 R6         2.2.0   2016-10-05 CRAN (R 3.3.3)                
 Rcpp       0.12.10 2017-03-19 CRAN (R 3.3.3)                
 rjson    * 0.2.15  2014-11-03 CRAN (R 3.3.2)                
 Roxford  * 0.0.1.1 2017-06-08 Github (flovv/Roxford@b18b602)
 withr      1.0.2   2016-06-20 CRAN (R 3.3.3)                
> 
MarcinKosinski commented 7 years ago

OK! westcentralus for me ^^

> getDescriptionResponseURL(banner2, key1, region = 'westcentralus')
              tags1 tags2 tags3 tags4    tags5  tags6  tags7   tags8       tags9 tags10    tags11 tags12 tags13 tags14 tags15   tags16 tags17 tags18 tags19
description outdoor table water chair building wooden living sitting overlooking  ocean furniture   view  beach  large  bench umbrella  white  clock   blue
requestId      <NA>  <NA>  <NA>  <NA>     <NA>   <NA>   <NA>    <NA>        <NA>   <NA>      <NA>   <NA>   <NA>   <NA>   <NA>     <NA>   <NA>   <NA>   <NA>
metadata       <NA>  <NA>  <NA>  <NA>     <NA>   <NA>   <NA>    <NA>        <NA>   <NA>      <NA>   <NA>   <NA>   <NA>   <NA>     <NA>   <NA>   <NA>   <NA>
                captions.text captions.confidence width height format
description a view of a beach   0.880363816907186  <NA>   <NA>   <NA>
requestId                <NA>                <NA>  <NA>   <NA>   <NA>
metadata                 <NA>                <NA>  1024    341   Jpeg