Configure image preprocessing options
mainThe library provides two preprocessing modes that affect how images are prepared before inference. Choosing a mode will change the resulting NSFW probability scores.
YAHOO: The default mode. It mimics the original Yahoo Caffe and TensorFlow 1 implementations. It involves resizing to(256, 256), an intermediate JPEG memory step, cropping to a(224, 224)center, swapping to BGR, and subtracting the mean[104, 117, 123].SIMPLE: A more intuitive mode. It resizes directly to(224, 224), converts to NumPy, swaps to BGR, and subtracts the mean[104, 117, 123].
Note: Using SIMPLE will result in different probability outputs compared to the default YAHOO mode.