{"action":"created","issue":{"url":"https://api.github.com/repos/beniz/deepdetect/issues/64","repository_url":"https://api.github.com/repos/beniz/deepdetect","labels_url":"https://api.github.com/repos/beniz/deepdetect/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/beniz/deepdetect/issues/64/comments","events_url":"https://api.github.com/repos/beniz/deepdetect/issues/64/events","html_url":"https://github.com/beniz/deepdetect/issues/64","id":133212744,"number":64,"title":"Gender model always predict the same class with same probability","user":{"login":"jplu","id":959590,"avatar_url":"https://avatars.githubusercontent.com/u/959590?v=3","gravatar_id":"","url":"https://api.github.com/users/jplu","html_url":"https://github.com/jplu","followers_url":"https://api.github.com/users/jplu/followers","following_url":"https://api.github.com/users/jplu/following{/other_user}","gists_url":"https://api.github.com/users/jplu/gists{/gist_id}","starred_url":"https://api.github.com/users/jplu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jplu/subscriptions","organizations_url":"https://api.github.com/users/jplu/orgs","repos_url":"https://api.github.com/users/jplu/repos","events_url":"https://api.github.com/users/jplu/events{/privacy}","received_events_url":"https://api.github.com/users/jplu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/beniz/deepdetect/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/beniz/deepdetect/labels/model","name":"model","color":"bfe5bf"},{"url":"https://api.github.com/repos/beniz/deepdetect/labels/neural%20net","name":"neural net","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"beniz","id":3530657,"avatar_url":"https://avatars.githubusercontent.com/u/3530657?v=3","gravatar_id":"","url":"https://api.github.com/users/beniz","html_url":"https://github.com/beniz","followers_url":"https://api.github.com/users/beniz/followers","following_url":"https://api.github.com/users/beniz/following{/other_user}","gists_url":"https://api.github.com/users/beniz/gists{/gist_id}","starred_url":"https://api.github.com/users/beniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beniz/subscriptions","organizations_url":"https://api.github.com/users/beniz/orgs","repos_url":"https://api.github.com/users/beniz/repos","events_url":"https://api.github.com/users/beniz/events{/privacy}","received_events_url":"https://api.github.com/users/beniz/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-02-12T11:09:54Z","updated_at":"2016-02-12T13:54:59Z","closed_at":null,"body":"Hello,\r\n\r\nI'm currently testing your tool for gender recognition. I set up a gender service with the model provided here: http://www.deepdetect.com/models/gender.tar.bz2\r\n\r\nAnd every time I try to predict a gender using this service with a different image, I always get the class \"man\" with the probability \"0.008771929889917374\".\r\n\r\nI have tested with this list of images:\r\n\r\n* http://i.f1g.fr/media/ext/400x/madame.lefigaro.fr/sites/default/files/img/2015/08/les-mensurations-de-la-femme-ideale-a-travers-18-pays.jpg\r\n* http://4.bp.blogspot.com/-uwu7SmTbBXI/VD_NNJc4Y-I/AAAAAAAAK1I/rt9de3mWXJo/s1600/faux-fur-coat-winter-2014-big-trend-10.jpg/\r\n* http://www.bragard.fr/471/tridou-veste-homme-noir.jpg\r\n\r\nHere the command line I used to create the service:\r\n\r\n```\r\ncurl -X PUT \"http://localhost:8080/services/gender\" -d \"{\\\"mllib\\\":\\\"caffe\\\",\\\"description\\\":\\\"clothes classification\\\",\\\"type\\\":\\\"supervised\\\",\\\"parameters\\\":{\\\"input\\\":{\\\"connector\\\":\\\"image\\\",\\\"height\\\":224,\\\"width\\\":224},\\\"mllib\\\":{\\\"nclasses\\\":2}},\\\"model\\\":{\\\"repository\\\":\\\"/home/eurecom/Documents/deepdetect/gender\\\"}}\"\r\n```\r\nHere the command line I used to predict the gender:\r\n\r\n```\r\ncurl -X POST \"http://localhost:8080/predict\" -d \"{\\\"service\\\":\\\"gender\\\",\\\"parameters\\\":{\\\"output\\\":{\\\"best\\\":5}},\\\"data\\\":[\\\"http://4.bp.blogspot.com/-uwu7SmTbBXI/VD_NNJc4Y-I/AAAAAAAAK1I/rt9de3mWXJo/s1600/faux-fur-coat-winter-2014-big-trend-10.jpg\\\"]}\"\r\n```\r\n\r\nDid I do something wrong by creating the service? Did I do not use correctly the service? Or id this a bug?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/beniz/deepdetect/issues/comments/183340712","html_url":"https://github.com/beniz/deepdetect/issues/64#issuecomment-183340712","issue_url":"https://api.github.com/repos/beniz/deepdetect/issues/64","id":183340712,"user":{"login":"beniz","id":3530657,"avatar_url":"https://avatars.githubusercontent.com/u/3530657?v=3","gravatar_id":"","url":"https://api.github.com/users/beniz","html_url":"https://github.com/beniz","followers_url":"https://api.github.com/users/beniz/followers","following_url":"https://api.github.com/users/beniz/following{/other_user}","gists_url":"https://api.github.com/users/beniz/gists{/gist_id}","starred_url":"https://api.github.com/users/beniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beniz/subscriptions","organizations_url":"https://api.github.com/users/beniz/orgs","repos_url":"https://api.github.com/users/beniz/repos","events_url":"https://api.github.com/users/beniz/events{/privacy}","received_events_url":"https://api.github.com/users/beniz/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T13:54:59Z","updated_at":"2016-02-12T13:54:59Z","body":"OK, I've been able to check & fix it (from a bus :)). \r\n\r\nPlease download the tar.bz2 file again and test.\r\n\r\nScores are actually perfect on your examples:\r\n```\r\ncurl -X POST \"http://localhost:8080/predict\" -d \"{\\\"service\\\":\\\"gender\\\",\\\"parameters\\\":{\\\"output\\\":{\\\"best\\\":114}},\\\"data\\\":[\\\"http://i.f1g.fr/media/ext/400x/madame.lefigaro.fr/sites/default/files/img/2015/08/les-mensurations-de-la-femme-ideale-a-travers-18-pays.jpg\\\"]}\"\r\n{\"status\":{\"code\":200,\"msg\":\"OK\"},\"head\":{\"method\":\"/predict\",\"time\":4130.0,\"service\":\"gender\"},\"body\":{\"predictions\":{\"uri\":\"http://i.f1g.fr/media/ext/400x/madame.lefigaro.fr/sites/default/files/img/2015/08/les-mensurations-de-la-femme-ideale-a-travers-18-pays.jpg\",\"classes\":[{\"prob\":1.0,\"cat\":\"women\"},{\"prob\":9.654188559693467e-10,\"last\":true,\"cat\":\"men\"}]}}}\r\n```\r\nand\r\n```\r\ncurl -X POST \"http://localhost:8080/predict\" -d \"{\\\"service\\\":\\\"gender\\\",\\\"parameters\\\":{\\\"output\\\":{\\\"best\\\":2}},\\\"data\\\":[\\\"http://www.bragard.fr/471/tridou-veste-homme-noir.jpg\\\"]}\"\r\n{\"status\":{\"code\":200,\"msg\":\"OK\"},\"head\":{\"method\":\"/predict\",\"time\":6805.0,\"service\":\"gender\"},\"body\":{\"predictions\":{\"uri\":\"http://www.bragard.fr/471/tridou-veste-homme-noir.jpg\",\"classes\":[{\"prob\":1.0,\"cat\":\"men\"},{\"prob\":8.472202495113379e-9,\"last\":true,\"cat\":\"women\"}]}}}\r\n```"}}