Can AI Seamlessly Cloak Nudity? Unsupervised Image-to-Image Translation with GANs
Researchers propose an unsupervised GAN-based image-to-image translation method that automatically dresses nude women in bikinis, preserving semantic content while removing sensitive parts, using unpaired datasets and Mask‑RCNN background removal, demonstrating impressive visual results without manual annotation.
Reading guide: Image content moderation on the Internet is a widely discussed topic, yet current moderation still relies heavily on manual labor. Recent researchers have employed generative adversarial networks (GANs) in an unsupervised manner to automatically dress nudity with bikinis, removing sensitive information without altering the image semantics. They gathered datasets from the web and used Mask‑RCNN to strip backgrounds for better training. The dataset will be made available for research, though a download link is not yet provided.
Internet’s easy access and ubiquitous use make it possible to search for any content at any time, but this convenience comes at the cost of encountering unwanted explicit material. Automatically filtering such content is therefore essential.
Early work on nude and pornographic content moderation focused on detecting body parts such as faces, skin, and nipples. More recent studies use state‑of‑the‑art representation learning to automatically distinguish sensitive from non‑sensitive content, typically framing the problem as binary classification and discarding entire images or video frames, which can degrade user experience.
Ideally, a system would automatically mask only the sensitive regions while preserving the rest of the image, reducing the need for extensive manual annotation. Figure 1 illustrates this ideal scenario.
Method
We propose an adversarial training‑based image‑to‑image translation approach that implicitly locates sensitive regions and covers them with appropriate clothing, preserving the original semantics. The method maps an image x from the sensitive domain X (nude women) to an image y in the non‑sensitive domain Y (women in bikinis), where the sensitive parts are replaced by a bikini.
Architecture
The architecture follows the unpaired image‑to‑image translation paradigm. Two generators, G: X→Y and F: Y→X, learn mappings between domains, while two discriminators, D_X and D_Y, distinguish real images from generated ones. D_X tries to differentiate real images x from translated images F(y), and D_Y does the same for real y versus G(x).
Dataset
We crawled two image sets from the Internet: nude women and women wearing bikinis. After filtering to keep only single‑person images, we split each set into training and test subsets. The bikini set contains 1,044 training and 117 test images; the nude set contains 921 training and 103 test images. The dataset is released for research purposes.
Experiments
Original Dataset Results
Figure 3 shows results when training on the original dataset. The first row displays real images (pixelated for privacy), the second row shows outputs from a ResNet generator with nine residual blocks, and the third row shows outputs from a U‑Net‑256 generator.
Background‑Removed Dataset Results
To improve foreground‑background separation, we applied Mask‑RCNN to segment persons and removed backgrounds, creating a new dataset. Figure 4 presents the training results on this background‑removed dataset, showing more consistent generation compared to the original data.
Overall, the proposed unsupervised image‑to‑image translation framework can automatically dress nude images with bikinis, preserving semantic content while eliminating sensitive regions, and does so without requiring paired training data or manual annotation of body parts.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
