Research Article
Explicit Content Detection System: An Approach towards a Safe and Ethical Environment
Pseudocode 2
Checking video content function.
| FUNCTION VideoModule() | | IF model is detected as a VIDEO | | IF extension is NOT a legitimate video extension THEN | | Label the file as SUSPICIOUS | | ELSE | | numberOfFrames=Get NumberOfFrames(Video_Path) | | /Do Sampling taking square root of total number of frames/ | | n = doRandomShuffle(numberOfFrames) | | /Select rFrames = () frames to the server and gets their Probability value ranging from 0-1/ | | ArrayList<double>rFramesVals new ArrayList<>(); | | / To store tempVar no of Probability Values / | | FOREACH f in rFrames | | rFramesVals.add(getExplicitProbability(f)) | | /Now, Take probability of each frame in rFrames and store it in rFramesVals List / | | IF all the values in rFramesVals< Threshold THEN | | model.isExplicit = False; | | ELSE | | /Take the value which is just higher than the threshold from the array rFramesValsand | | store it in variable opt_threshold / | | /Now pick the remaining frames singularly and compare the value with opt_thresholduntil all frames | | checked or any frame greater than opt_thresholdis found / | | IF Any Frame Greater than opt_thresholdis Found THEN | | model.isExplicit = true; | | ELSE | | model.isExplicit = false; | | ENDFUNCTION |
|