As a self-development exercise, I want to develop a simple classification algorithm that, given a particular cell of a Dilbert cartoon, is able to identify which characters are
You can try building a model by uploading your training data (images of comics) to demo.nanonets.ai (free to use)
Then query the API using the following (Python Code):
import requests
import json
import urllib
model_name = "Enter-Your-Model-Name-Here"
url = "http://static5.businessinsider.com/image/525464f969bedd0b0422cfb6/dilbert-creator-scott-adams-presents-his-10-favorite-comics-of-all-time.jpg"
files = {'uploadfile': urllib.urlopen(url).read()}
url = "http://demo.nanonets.ai/classify/?appId="+model_name
r = requests.post(url, files=files)
print json.loads(r.content)
the response looks like:
{
"message": "Model trained",
"result": [
{
"label": "Dilbert",
"probability": 0.97
},
{
"label": "PHB",
"probability": 0.025
},
{
"label": "Ratbert",
"probability": 0.005
}
]
}