aMahanna / picsumvision

an interactive graph-based image repository
https://picsumvision.mahanna.dev
MIT License
8 stars 2 forks source link

ArangoDB: Configure Face Detection & Safe Search in GraphDB #19

Open aMahanna opened 3 years ago

aMahanna commented 3 years ago

Both FACE_DETECTION and SAFE_SEARCH_DETECTION use the enum values for their keys:

'UNKNOWN' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY'

In order to take advantage of these types of metadata, I need to split them up into smaller categories. For example, the Face Detection metadata returns the following attributes:

type likelihood = 'UNKNOWN' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY';
interface faceModel {
  confidence: number;
  joy: likelihood;
  sorrow: likelihood;
  anger: likelihood;
  surprise: likelihood;
  headwear: likelihood;
}

Ideally, each key (joy, sorrow, etc...) has its own collection, so that graph traversal is easier in cases where a User searches for a single emotion in a picture, such as anger.

The same applies for the SafeSearch model

aMahanna commented 3 years ago

For the time being this won't be looked at, since I don't see the value of these features for our Image set.