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
574 stars 136 forks source link

Release 2.0.8 - no prediction object available when no face found #39

Closed elad-bar closed 1 year ago

elad-bar commented 1 year ago

Area of Concern

Describe the bug Since v2.0.8, when no face detected, prediction property is not available, breaking change

Expected behavior Empty array as it was before, 0 items in array self explains that no face found

Your System (please complete the following information):

ChrisMaunder commented 1 year ago

This was a bug and has been fixed in the next release. In recognise_face it should be

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