codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
Other
605 stars 141 forks source link

When no face are found, server is write an error message to log #12

Closed elad-bar closed 1 year ago

elad-bar commented 1 year ago

Description When no face are found, server is write an error message to log

Expected When no face are found (which is a normal result), log level should be informational with successful output

Actual Log level is set to an error and response is a failure.

Suggested Solution Instead of the following code in src/AnalysisLayer/Vision/intelligencelayer/face.py

if found_face == False:
            output = {"success": False, "error": "No face found in image"}

change to:

if found_face == False:
            output = {"success": True, "predictions": [], "message": "No face found in image"}
ChrisMaunder commented 1 year ago

Good catch. Done.

elad-bar commented 1 year ago

Reopeining the issue as in latest version, for each processing without face the following Error appear: Error Face Processing: No face found in image