Feat/face detection #57

Open
2584433 wants to merge 4 commits from feat/face-detection into main
Showing only changes of commit a040547ac0 - Show all commits

View File

@@ -35,11 +35,12 @@ export type BasicBeliefNodeData = {
}; };
// These are all the types a basic belief could be. // These are all the types a basic belief could be.
export type BasicBeliefType = Keyword | Semantic | DetectedObject | Emotion export type BasicBeliefType = Keyword | Semantic | DetectedObject | Emotion | Face
type Keyword = { type: "keyword", id: string, value: string, label: "Keyword said:"}; type Keyword = { type: "keyword", id: string, value: string, label: "Keyword said:"};
type Semantic = { type: "semantic", id: string, value: string, description: string, label: "Detected with LLM:"}; type Semantic = { type: "semantic", id: string, value: string, description: string, label: "Detected with LLM:"};
type DetectedObject = { type: "object", id: string, value: string, label: "Object found:"}; type DetectedObject = { type: "object", id: string, value: string, label: "Object found:"};
type Emotion = { type: "emotion", id: string, value: string, label: "Emotion recognised:"}; type Emotion = { type: "emotion", id: string, value: string, label: "Emotion recognised:"};
type Face = { type: "face", id: string, value: string, label: "Face detected"};
export type BasicBeliefNode = Node<BasicBeliefNodeData> export type BasicBeliefNode = Node<BasicBeliefNodeData>
@@ -157,6 +158,7 @@ export default function BasicBeliefNode(props: NodeProps<BasicBeliefNode>) {
<option value="semantic">Detected with LLM:</option> <option value="semantic">Detected with LLM:</option>
<option value="object">Object found:</option> <option value="object">Object found:</option>
<option value="emotion">Emotion recognised:</option> <option value="emotion">Emotion recognised:</option>
<option value="face">Face detected</option>
</select> </select>
{wrapping} {wrapping}
{data.belief.type === "emotion" && ( {data.belief.type === "emotion" && (
@@ -225,6 +227,9 @@ export function BasicBeliefReduce(node: Node, _nodes: Node[]) {
result["name"] = data.belief.value; result["name"] = data.belief.value;
result["description"] = data.belief.description; result["description"] = data.belief.description;
break; break;
case "face":
result["face_present"] = true;
break;
default: default:
break; break;
} }