lucylow / salty-wet-man

Binary classification to filter and block unsolicited NSFW content from annoying coworkers... --- ...
https://lucylow.com/salty-wet-man/
Other
12 stars 3 forks source link
activation-functions data-augmentation gradient gradient-activation image-analysis image-classification image-manipulation image-processing image-recognition imagenet imagenet-classification-challenge imagenet-classifier keras neural-network nsfw qbic tensorflow tensorflow-js vgg16 waifu-dataset

Salty Wet Man (SWM)

The goal of Salty Wet Man is to flag inappropriate online content to make the internet a safer and more inclusive space for everyone.

[![Status](https://img.shields.io/badge/status-work--in--progress-success.svg)]() [![GitHub Issues](https://img.shields.io/github/issues/lucylow/salty-wet-man.svg)](https://github.com/lucylow/salty-wet-man/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/lucylow/salty-wet-man.svg)](https://github.com/lucylow/salty-wet-man/pulls) [![License](https://img.shields.io/bower/l/bootstrap)]()


Table_of_Contents


Motivation: Online Safety

A chessboard features 16 playing pieces with 6 types where each piece has special moves and the end game is to capture the opponent's King resulting in "checkmate". What is the most powerful piece on the chess board? Many people will say the King or Queen because they are the highest rank. However I believe the most powerful are the nine Pawns (lowest rank). This is because through pawn promotion gameplay, the nine Pawns have the power to get promoted to become Queens, Rooks, Bishops, or Knights. Therefore we need to nurture and protect them throught gameplay as they are the seeds for the future.

Being online can astronomically magnify threats and risks that vulnerable children already face offline.

Children are increasingly exposed to digital media and online technology at an early age. They are going online to do schoolwork, play games, and socialize with over 4 billion people (1 in 3 children) connected to the internet. Around 60% of fourth to eighth graders have access to phones or tablets and almost half of them have access to a computer in their bedrooms.

Access to the internet can lead to risks of exposure to online predators posed by online sexual abuse and exploitation, cyberbullying, exposure to harmful inappropriate content, and use and sharing of personal data. The COVID19 global pandemic with it's lockdown measures has led to widespread school closures and physical distancing measures increasing our dependence on technology to connect. Law enforcement authorities and reporting agencies have seen a statistically signficant increase in the amount of child sexual abuse material being shared online, of which an ever increasing percentage involves self-generated content.


Computer Vision Technical Solution

Innovation at UNICEF is about doing new things to solve problems and improve the lives of children around the world. Technological solutions like Online Protection Tools are key to efficiently respond the digital risks for children. Four categories of digital risks defined by UNICEF: Content, Contact, Conduct and Contract Risks: https://www.unicef.org/innovation/apply-ChildOnlineSafety. Focusing on Content Risks, which is defined as exposure to harmful or age-inappropriate content, such as pornography, child sexual abuse material, hate speech and extremism, discriminatory or hateful content, disinformation, online games, gambling, content that endorses risky or unhealthy behaviours and violent content which may be upsetting or show criminal activity.


Convolutional_Neural_Networks

Image Datasets

NSFW Images

GPU Implementation


Object_Recognition

Deep Learning's Impact on Computer Vision

deep learning impact

Labeled Image-Training Datasets

ImageNet used for Large Scale Object Recognition


NSFW_Object_Recognition:_Content-Based_Retrival_via_Localization

Image Location with Large Areas of Skin-colored Regions

Elongated Regions Grouping

Classify Regions into Human Limbs


NSFW_Object_Recognition:_Detection,_and_Segmentation


NSFW_Object_Recognition_Image_Cropping


Neural_Network_Classifier_Model

Architecture

Disadvantages

Keras Implementation

keras.applications.vgg16.VGG16(include_top=True, weights='imagenet', input_tensor=None, input_shape=None, pooling=None, classes=1000)

Full Keras VGG Code


Neural_Network_Errors_and_Overfitting

Data Augmentation

Dropout Rates


Technical_Installations

Requires heavy computation

  1. Install Python dependencies and packages (Keras, TensorFlow, and TensorFlow.js) - best to run from virtualenv

  2. Download and convert the VGG16 model to TensorFlow.js format

  3. Launch Node.js script to load converted model and compute maximally-activating input images for convnet's filters using gradient ascent in the input space. Save image files under dist/filters directory

  4. Launch Node.js script to calculate internal convolutional layers' activations and gradient-based Class Activation Map (CAM). Save image files under dist/activation directory

  5. Compile. Launch web view at https://lucylow.github.io/salty-wet-man/


Technical_Visualizations

yarn visualize

Increase the number of filters to visualize per convolutional layer from default 8 to larger value (ex. 18):

yarn visualize --gpu --filters 18

Default image used for internal-activation and CAM visualization is "nsfw.jpg". Switch to another image by using the "--image waifu-pic.jpeg" 👀

yarn visualize --image waifu-pic.jpeg

Technical_User_Privacy_Considerations


References