update ieemoo-ai-isempty.py.
This commit is contained in:
@ -139,27 +139,27 @@ def get_isempty():
|
|||||||
img_data = Image.open('huanyuan.jpg')
|
img_data = Image.open('huanyuan.jpg')
|
||||||
result = predictor.normal_predict(img_data, result) # 1==empty, 0==nonEmpty
|
result = predictor.normal_predict(img_data, result) # 1==empty, 0==nonEmpty
|
||||||
|
|
||||||
riseresult = lightrise.riseempty(img_data)
|
#riseresult = lightrise.riseempty(img_data)
|
||||||
#print(riseresult["rst_cls"])
|
#print(riseresult["rst_cls"])
|
||||||
|
|
||||||
if(result["rst_cls"]==1):
|
# if(result["rst_cls"]==1):
|
||||||
if(riseresult["rst_cls"]==1):
|
# if(riseresult["rst_cls"]==1):
|
||||||
result = {}
|
# result = {}
|
||||||
result["success"] = "true"
|
# result["success"] = "true"
|
||||||
result["rst_cls"] = 1
|
# result["rst_cls"] = 1
|
||||||
else:
|
# else:
|
||||||
result = {}
|
# result = {}
|
||||||
result["success"] = "true"
|
# result["success"] = "true"
|
||||||
result["rst_cls"] = 0
|
# result["rst_cls"] = 0
|
||||||
else:
|
# else:
|
||||||
if(riseresult["rst_cls"]==0):
|
# if(riseresult["rst_cls"]==0):
|
||||||
result = {}
|
# result = {}
|
||||||
result["success"] = "true"
|
# result["success"] = "true"
|
||||||
result["rst_cls"] = 0
|
# result["rst_cls"] = 0
|
||||||
else:
|
# else:
|
||||||
result = {}
|
# result = {}
|
||||||
result["success"] = "true"
|
# result["success"] = "true"
|
||||||
result["rst_cls"] = 1
|
# result["rst_cls"] = 1
|
||||||
|
|
||||||
return repr(result)
|
return repr(result)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user