Research Article

Explicit Content Detection System: An Approach towards a Safe and Ethical Environment

Pseudocode 1

Image content based system.
FUNCTION ImageModule(ImageFilePath)
IF extension is NOT a legitimate image extension
//label the file as SUSPICIOUS
ELSE
Image.Encode(); /Encode it to base64 String
Base64 String passed to the web service.
The Web Service would return the probability of the
Image i.e either file is NSFW or SFW. /
IF returnedProbabiltyValue>= 0.6 AND < 0.7 THEN
model.status = LOW; / Image contains low Level Explicit Content /
ELSE IF returnedProbabiltyValue>= 0.7 AND < 0.8 THEN
model.status = MEDIUM; / Image Contains Medium Level Explicit Content /
ELSE IF returnedProbabiltyValue>= 0.8 AND < 1 THEN
model.status = HIGH; / Image Contains High Level Explicit Content /
ELSE
model.status = Non_Explicit; / Image Doesn’t contain any Explicit Content /
ENDFUNCTION