These are chat archives for beniz/deepdetect

30th
Oct 2017
Emmanuel Benazera
@beniz
Oct 30 2017 10:29
Hi @rperdon, your model appears to work perfectly with vanilla DD, no modification required. Also, there's no issue with 256x256 inputs though 227x227 is the correct size to be provided. Both your test image and https://i.pinimg.com/736x/6a/21/71/6a2171edb4778b68fb4b419f8c9c7ebb--anime-drawings-girl-anime-girl-art.jpg are correctly classified.
(oops, not my intention to put the anime jpg on screen)
Now, this suggests that the issue on your side, maybe some wrapping code. The fact that you said you had labels > 1 also suggests a problem on your side

The service creation and prediction calls are below:

curl -X PUT "http://localhost:8080/services/imageserv" -d '{
       "mllib":"caffe",
       "description":"image classification service",
       "type":"supervised",
       "parameters":{
         "input":{
           "connector":"image","width":227,"height":227
         },        
         "mllib":{
           "nclasses":2
         }
       },                                                                                                                    
       "model":{
         "repository":"/path/to/AnimeAN/"
       }
     }'

and

curl -X POST "http://localhost:8080/predict" -d '{
       "service":"imageserv",
       "parameters":{                               
         "input":{
         },            
         "output":{    
           "best":3                                    
         }         
       },         
       "data":["https://i.pinimg.com/736x/6a/21/71/6a2171edb4778b68fb4b419f8c9c7ebb--anime-drawings-girl-anime-girl-art.jpg"]
     }'
Output:
{"status":{"code":200,"msg":"OK"},"head":{"method":"/predict","service":"imageserv","time":1814.0},"body":{"predictions":[{"uri":"https://i.pinimg.com/736x/6a/21/71/6a2171edb4778b68fb4b419f8c9c7ebb--anime-drawings-girl-anime-girl-art.jpg","classes":[{"prob":0.9997690320014954,"cat":"Anime"},{"prob":0.00023091673210728914,"last":true,"cat":"Non-anime"}]}]}}
In order to see the labels as string, you should put a corresp.txt file into your model directory, and that looks like:
0 Anime
1 Non-anime
Emmanuel Benazera
@beniz
Oct 30 2017 10:37
Probabilities might vary slightly with Digits, but overall, the results above appear correct. Please note that compatibility with Digits is not a feature of DD, so use at your own risk.
(Digits and us know each other through NVidia personnel, but they have their own agenda).
rperdon
@rperdon
Oct 30 2017 13:49
I'll go over my load/calls again to confirm I'm using it correctly.. Thanks for the input.
rperdon
@rperdon
Oct 30 2017 19:25
48650281-happy-kids-on-the-beach-having-fun.jpg
This image was seen as anime 0.981
When run in with the classification py, I get non anime 92%
rperdon
@rperdon
Oct 30 2017 19:39
I redownloaded the original deepdetect and re-ran using the commands indicated
curl -X POST "http://localhost:9999/predict" -d '{
"service":"animeAN",
"parameters":{
"input":{
},
"output":{
"best":3
}
},
"data":["/images/48650281-happy-kids-on-the-beach-having-fun.jpg"]
}'
 {"status":{"code":200,"msg":"OK"},"head":{"method":"/predict","service":"animeAN","time":1403.0},"body":{"predictions":[{"uri":"/images/48650281-happy-kids-on-the-beach-having-fun.jpg","classes":[{"prob":0.9810927510261536,"cat":"Anime\r"},{"prob":0.018907224759459497,"last":true,"cat":"Non-anime"}]}]}}
rperdon
@rperdon
Oct 30 2017 20:00
I was able to commit changes for the modified deepdetect to a beniz/deepdetectRGB so I can make direct comparisons
Emmanuel Benazera
@beniz
Oct 30 2017 20:32
Is your corresp.txt correct ?