Setu classification.
python3 server_flask.py <host> <port> <valid_img_save_dir> <invalid_img_save_dir>
- valid_img_save_dir: the image got from valid api list.
- invalid_img_save_dir: the image got beyond valid api list.
/dice?url=http://random.api.url
optional: noimg=true loli=true class=9/0
- The classification is returned in headers, which named
Class
. - The http content is a webp image.
- There are also a
DHash
value returned in headers and being encoded bybase16384
. - If noimg=true is set, the server will only return json in API 2.
- If loli=true is set, the server will use lolicon api and ignore url parameter.
- If class=9 is set, the server will return class from 0 to 8.
- If class=0 is set, the server will not predict class and behave as a image proxy.
/classdat
- Post an image to this url.
- Returns json with its
dhash
&class
.
{"img": "dhash", "class": 0}
/classform
- Post multiple images in a form to this url.
- Returns json array with its
dhash
&class
.
{"result": [{"name": "name1", "img": "dhash1", "class": 0}, ...]}