CoolFace
Apppublic

taskswithcode/salient-object-detection

sourceHugging Facemitupdated 4y agoView on Hugging Face
13likes
python_usage.txt8 linesDownload Raw Back to root
1import requests2<br/>3file_data = open("sample.jpg", "rb") <br/>4mask_type="blur" #rgba,green,blur,map <br/>5r = requests.post("https://www.taskswithcode.com/salient_object_detection_api/", <br/>6&nbsp;&nbsp;&nbsp;data={"mask":mask_type}, files={"test":file_data}) <br/>7&nbsp;&nbsp;&nbsp;results = {"response":r.content,"size":len(r.content)} <br/>8