Starpery.com

Making Deepfake Doll Porn (or any video)

Got an idea? Need an invention?
User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Making Deepfake Doll Porn (or any video)

Post by baphometric »

Making Deepfake Doll Porn (or any video)



TLDR;

I have successfully used deepfake AI software to insert my doll's face into a pornographic video. Link is at the bottom. It's not perfect, but it's a start. This technology can be used to put a doll's face into any kind of video, porn or not.



Here's a quick teaser GIF so you know what I'm talking about

Mia_deepfake_demo.gif
Mia_deepfake_demo.gif (5.48 MiB) Viewed 4610 times


My wife's actual reaction when she saw the video
You're an evil sex wizard...

Abstract

In this article I will detail how I utilized deepfake AI software, specifically DeepFaceLab, to successfully overlay my doll Mia's face into a video. I chose a pornographic film for my first subject because that is where my interests lie, but these techniques could be applied to a wide variety of videos of all kinds. The sky is the limit with this kind of technology, you could fake your doll's face into a movie, a TV show, anything you want. But there are some challenges, due to both the technical complexity of the subject matter, as well as unique challenges imposed by the realities of using a Silicone/TPE doll. First I will provide some background material on the subject, the guides I followed, and establish the novelty of this approach. Then,I will go into further detail on the hardware I used, as well as the methodology I followed for training the machine learning model and generating the video. And finally, I will discuss the issues that arise in the video produced, and provide some thoughts on future improvements I could make to refine my techniques further.

Attention

This article is for technical and academic use only. Please do not apply it to illegal and unethical scenarios.

In the event of violation of the legal and ethical requirements of the user's country or region, this author is exempt from liability.

Background Research

What are Deepfakes?

I will provide some quotes from this Business Insider article defining what deepfake videos are. I recommend reading the full article and watching the video to really get it, but these basic quotes will also suffice:
Deepfakes use deep learning artificial intelligence to replace the likeness of one person with another in video and other digital media.
The term "deepfake" comes from the underlying technology "deep learning," which is a form of AI. Deep learning algorithms, which teach themselves how to solve problems when given large sets of data, are used to swap faces in video and digital content to make realistic-looking fake media.

There are several methods for creating deepfakes, but the most common relies on the use of deep neural networks involving autoencoders that employ a face-swapping technique. You first need a target video to use as the basis of the deepfake and then a collection of video clips of the person you want to insert in the target.

The videos can be completely unrelated; the target might be a clip from a Hollywood movie, for example, and the videos of the person you want to insert in the film might be random clips downloaded from YouTube.

The autoencoder is a deep learning AI program tasked with studying the video clips to understand what the person looks like from a variety of angles and environmental conditions, and then mapping that person onto the individual in the target video by finding common features.
Guides I Followed

The primary source I used was the official guide for DeepFaceLab. The code repository can be found here, which links to the guide here.

I also used this guide as a secondary source of information.

If you want to repeat my methodology, follow the methods in the first guide and give it a shot yourself. I want other people to be able to read my article, and read the guides, and create doll deepfake content for themselves, too. We can all share techniques and learnings and become better at this together.

Establishment of Novelty

Basically, why does this article matter?

I believe that I may be the first person to have successfully attempted deepfaking a sexdoll's face into a video using this technology. I have researched on doll forum, and on the MrDeepfakes forum, and also just generally googled around for this kind of thing. I inquired about it in this thread on TDF. As far as I can tell, so far the doll community has dabbled in deepfaking with the simple phone apps like Tokkingheads, Revive, FaceApp, or other apps like those. I have also seen people on MrDeepfakes faking celebrity faces onto sexdoll bodies, and this is interesting but it doesn't accomplish bringing your doll to life by transferring the doll onto another model. But I might be the first person to really go the full length and train their own machine learning models with their own hardware and use true deepfake quality software to create this kind of video. This technique brings a doll to life in a new way and a new depth that has not yet been seen before. I believe this information will be useful and interesting for doll owners and AI researchers everywhere.

If I'm not the first, please let me know! I want to collaborate with other people who have attempted this so we can get better together. But if not, then I'm here to blaze a new trail for doll owners everywhere! And either way, this must be the first public guide on how to do it with a doll.

Hardware Specs and Performance Notes

I have a consumer-grade gaming desktop, but it's sort of older now and I wasn't sure if I could even do this. I'll report the specs that I used, but possibly even worse specs could accomplish it. Even better specs will produce faster results, too. Cross reference the guides I posted for minimum requirements.

I also want to note that I had MSI afterburner running the whole time and kept an eye on my GPU. I try not to let it go above 85 degrees Celsius regularly, and had to limit the power to about 70% to keep it in a safe range. This is a familiar practice to anyone who mines cryptocurrency or performs other GPU intensive tasks. Take care, and don't fry your expensive graphics card!

The whole process took around 4 days in total, including running the programs overnight and while I was doing other things. It takes a while, but a lot of it is just waiting around.

GPU: Nvidia GTX 1080ti (11GB VRAM)
CPU: Intel i7 7700K
RAM: 32GB (64GB paging file, setting you change in windows)
Storage: M1 SSD

Methodology

Primarily I followed the first guide I linked above as my method. I had to make some adjustments to the techniques along the way to work with the doll. I pretty much just did the minimum requirements in most cases as a beginner, and will likely try some of the advanced techniques at a later time.

I won't provide a line-by-line description of following the guide, if you want to repeat my results you will just need to get to grips with the original guide and follow it yourself. But this may serve as a useful companion, specifically around the parts that pertain to dolls.

DeepFaceLab is essentially just a collection of user scripts (in .bat files) which you can run to start various programs that you will need to complete the whole process. There are a number of steps and different programs you will use. If you've never used a .bat file before, it's easy - just double click it to run. It will open up a terminal window and maybe ask you some questions, and may pop open other windows, too.

0. Deciding on the destination video

Before you begin any of the actual steps to create the deepfake, you need to decide on what video you are going to fake your doll into. You should choose an actress/actor who looks like your doll for maximum effectiveness. For my experiment I chose Skylar Vox, who I believe is a pretty close face match to Mia (as well as several of her hairstyles). You will need to consider your own doll's face, and do some research to find good candidates to fake her face onto.


1. Preparing the source materials

Now you need to collect source materials of your doll. In order to create a digital representation of your doll, the algorithm needs many, many pictures of her from all kinds of angles and with different facial expressions, eye positions, etc. The more different angles and expressions you can get, the better, because the AI will have more source data to work with and "match" to the destination video. The program can work with both pictures and videos, videos are even better since there are so many "frames" in the video, which are just pictures.

Now, since dolls are pretty limited in the expressions that they can make, this can be challenging. My approach was to take several videos of her head, rotating the camera around her and getting different angles. I did this a few different times with different eye rotations. I also added in lots of pictures that I had taken over the years of Mia.

This illustration from the second linked guide gives you an idea of the different angles you need to cover to build a comprehensive model. Even more extreme angles may be needed based on your destination video (I could have used some pointing straight up).

Human_Head_Angles_Diagram.png
Human_Head_Angles_Diagram.png (104.83 KiB) Viewed 4610 times

2. Splitting the source/destination into frames

The next step basically is a pre-processing step to extract the frames from any source videos and the destination videos. Just follow the guide closely, nothing special for dolls needed here.

I will give one recommendation that I found to be useful. The author tells you to rename the files that will be outputted to the data_src directory. Well, there will probably be hundreds or thousands of photos to rename, so this will be troublesome for most users. I recommend using a tool called PowerRename to rename the files in bulk. You can even write a regular expression to do the renaming, I wrote one to match on the filenames which are numbered like 001.png with a matcher like "(\d+).png" and then I replaced with "MVI_1192_$1.png" where MVI_1192 was the name of the movie. If you don't know what regular expressions are, I am sorry for cursing you with the burden of this knowledge.

2. Extracting faces in the pictures

The next program you will run is going to try to identify all the faces in the pictures. It will basically "zoom in" to a rectangle just around the face that it identifies. It will also try to align the face to the frame.
Some results will be wrong, and you'll need to correct for this. Fortunately I found that the algorithm did a pretty great job of identifying Mia's face. It actually had more false positives in the destination video, sometimes it would incorrectly identify the male star's penis as a face! If it does have trouble identifying your subjects, there is a manual mode you can use.

I think at this point the algorithm also tries to map out the features of the face like the eyes and lips, but I never did figure out how to validate that this was working correctly. I suspect that some of my images may have been mapped incorrectly. More on this in the results discussion.

3. Training the XSeg Model

OK, once you have all these faces extracted and aligned, you're ready to actually start the machine learning part! The first part involves training the XSeg model. XSeg is used to generate the "mask" that will be replaced in destination video. It's useful specifically because it lets you customize what parts of the face to train on and what to exclude. This should in theory help with partial obstructions of the face. You will need to train the model, and then make corrections to the face masks it generates. You do this by manually tracing the mask on some of the faces. Then you keep training, and the model learns from your masks and starts to get better at creating the masks itself.

Now you have trained the model that generates the masks. But we still aren't there yet. Now we need a new model, which will take those masks and merge them together, to create the final video.

4. Training the SAEHD model

The next step is training the actual deepfaking model itself. The guide recommends starting with the SAEHD model, and trying the AMP model at a future time (it's more advanced, but experimental and maybe harder to use). What is SAEHD? Well I don't have a clue, but I asked ChatGPT and it said "SAEHD stands for "Self-Attention Encoder with Highway and Dropout." It is a type of neural network architecture that uses self-attention mechanisms, highway connections, and dropout regularization. Self-attention mechanisms allow the model to weigh the importance of different parts of the input when making a prediction, while highway connections and dropout help to prevent overfitting. The specific details of the architecture will depend on the implementation and the task it is being used for." So I guess now we know.

Anyways, basically you're going to be training this model for hours and hours using your GPU to go through hundreds of thousands of iterations of the machine training. You'll use a number of different settings to first generalize the model against your faces, and then fine tune its ability to match on different angles, attention to eyes and mouth, and other settings which will generally dial in your model better. Basically you're looking to increase the quality of the matching and decrease the loss values that it reports.

Here's an example of the terminal output and the preview pane during this phase. Note that the loss values are shown in the terminal in brackets, the rightmost two values are the src and dest loss values (this confused me at first).

training.PNG
training.PNG (928.18 KiB) Viewed 4610 times

5. Merging the results

You did it, you trained your models, you didn't melt your graphics card, and you're ready to finally create the video. Well, there's only one step left before video creation, which is merging the source masks into the destination using the model you trained. You run the SAEHD merge script, and it will give you a preview of the video frames as it merges the source face into the destination. There's many parameters you can tweak for further refinement, but I just went with the basic recommendations in the guide. Once you do this, the program will have output a whole bunch of frames containing your doll's face merged in!

6. Video Creation

Finally, all that's left is to merge the frames back into a video, and add the audio track from the original video. There's a script that will automatically do this for you, or you can do it yourself in a video editor if you have the skills and want to further tweak and refine the video before publishing. But at this point, you can pat yourself on the back, because you've made a doll deepfake video! Crack open a cold beverage and celebrate yourself.

Results Discussion

Now let's discuss the results that the program achieved, and what can be done to improve on it. If you haven't scrolled to the bottom already and streamed or downloaded the video, go ahead and do that now and give it a watch or two. I'll wait...

Done? OK, let's talk about it. So, what did the program do well? In my opinion, the best thing that it did out of the box was the face position matching. It pretty much spot on matches the orientation of the actress's face, and subs in Mia's face just right. It tries to match Mia's facial expression to the actress, and it has some limited success. There are moments when her eyes or mouth move appropriately, but it's very limited. But all things considered, it's definitely a working deepfake video!

Now, what could be improved? Well, almost everything. There are two basic types of things to improve on. The first is just my own personal skills and understanding of the program. I made a lot of mistakes along the way, and could have done things better. But the second category is improving how a sexdoll can be used in the first place. Since the doll aspect is the prime focus of this work, let's start there.

To her credit, Mia does have an extremely realistic hard silicone face, and that usually gives the AI algorithms a better jumping off point than many other faces. But, I think the biggest limitation with the doll is the lack of facial expressions. None of the source data shows images of Mia closing her eyes, moving her eyebrows or jaw, or opening her mouth. These are all things that the actress does in the video, and not having a matching image of Mia is hurting the result. Mia doesn't blink in the video or change facial expression much, and the animation of her mouth is limited at best. So how can I work around this? Some possible options that I've thought of:

- Replace her eyelids with the moveable eyelids mod
- Convince XYDoll to release the face with moveable jaw
- Use AI programs to simulate facial expressions and movement

Of those options, I believe AI is the most promising. I have researched several apps such as Mug Life, Revive, FaceApp, and many others that can make a doll smile, blink, talk, etc. I believe that augmenting the source input data with simulated images of Mia from these apps will help to generate a more powerful and diverse model of her face, and improve the quality of the video. Watch this space for more updates as I try these methods, and please send me recommendations!

Another worthy mention is the possibility of using a single-image deepfake software such as SimSwap. I suspect that this would be a good solution for a sexdoll because it only uses a single image and thus gets around the lack of facial expressions. However, I am not sure if it can achieve as good of results as DeepFaceLab. Further experimentation with this tool is warranted.

There are also plenty of ways that I simply need to improve on my understanding and usage of the program. There is clearly a visible line between her doll face and the actress's face in many frames, and I could fix that by doing more blurring or mask feathering to blend it out. I could have also put time into improving the color match between the doll and the actress during the training. Additionally, I clearly made some mistakes in the treatment of obstructions and the face at extreme angles. When the bottle of oil passes in front of her face, you can clearly see it revert back to her original face - I think this was just my mistake. When her face is facing straight up, the program also loses her face and reverts back, and I think this is just down to fixing the face landmarks perhaps. In any case, I intend to continue improving my skills and getting better at polishing the video to achieve professional-looking results. But I have no doubt that with practice, patience, and some creative AI usage, I can get there in time.

Conclusion

AI technology is advancing at incredible rates, and we can use it and play with it to enhance our experience as doll owners. Deepfake videos have been demonstrated to work with doll faces, and could possibly work with other kinds of dolls, mannequins, statues, etc. Good results are achievable with common consumer-grade hardware. There are limitations and drawbacks to using a doll for deepfaking, but the future looks promising to solve those problems with other novel applications of AI and machine learning.

The future is here, and our dolls will have a place in it!

Video Links

MrDeepFakes Streaming Video




Megaupload file download




Giving Back

If you enjoyed this article and feel moved to donate, please give your money to the talented and beautiful actress in the video, Skylar Vox. If you are reading this Skylar, you are amazing and an inspiration.



Note to mods: apologies in advance if the GIF is not allowed, I don't mean to offend but I figured it's OK since it's only depicting her face.


User avatar
MarcusMM
Active Member
Active Member
Posts: 174
Joined: Sat Dec 21, 2019 9:11 am
Location: Caribbean Sea
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by MarcusMM »

Interesting, but I wouldn't do this to my doll!

If you'd create a lens for SnapCamera (from SnapChat, available as Windows application) of your doll, and feed in the actress face via a virtual camera driver into SnapCam, then your dolls face would move (with the teeth of the actress). Idk if you can use the movie 'as is' or if you need to cut only the face. If you just wanna try: There's a lens of Kayne West available, the results are quite impressive.
Technically it's a face mesh (if you're a programmer google 'python MediaPipe Face Mesh') to read the input, and applies it using the lens (face mesh and texture of your doll) to create the output. It's quite fast.
However, this method requires real work: The face mesh and texture for the lens must be created manually, and if you're not familiar with Blender or similar tools it's a pain in the back to do so. I'm not, so I'm working on some python scripts instead, to allow my dolls to take any facial expression from any picture.

User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by baphometric »

MarcusMM wrote: ↑Fri Jan 27, 2023 12:20 pm Interesting, but I wouldn't do this to my doll!

If you'd create a lens for SnapCamera (from SnapChat, available as Windows application) of your doll, and feed in the actress face via a virtual camera driver into SnapCam, then your dolls face would move (with the teeth of the actress). Idk if you can use the movie 'as is' or if you need to cut only the face. If you just wanna try: There's a lens of Kayne West available, the results are quite impressive.
Technically it's a face mesh (if you're a programmer google 'python MediaPipe Face Mesh') to read the input, and applies it using the lens (face mesh and texture of your doll) to create the output. It's quite fast.
However, this method requires real work: The face mesh and texture for the lens must be created manually, and if you're not familiar with Blender or similar tools it's a pain in the back to do so. I'm not, so I'm working on some python scripts instead, to allow my dolls to take any facial expression from any picture.
Sounds interesting, thanks for sharing!

I will likely keep exploring this particular avenue of deepfakes in favor of a snap lens, as I don't have any real skills in blender or 3D modeling (...yet).
Basically I just make AI do all the hard creative work, I'm just the script-monkey bashing things together until it works :D
Also, a snap lens would be great for sharing - but that's not a goal for me currently. A famous person like Kanye West, sure lots of people would reuse that filter. I doubt anyone would want to reuse the Mia filter, so probably it would be wasted effort.
Maybe I'll change my mind in a few years when Mia's the internet's most famous Doll pornstar, and her clamoring fans demand a snap lens :lol:

User avatar
Socratus
Doll Elder
Doll Elder
Posts: 2051
Joined: Mon Jan 23, 2023 11:06 am
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by Socratus »

It's like seeing what sex dolls might actually be like if we ever develope the technology to make them react and act like real women during actual sex. Fascinating. Also kinda uncanny valley weird. I'm sure we'd adapt though.
I apologise for any late responses to users trying to communicate with me, as a certain Mod has decided he doesn't like how I talked in a particular post then decided to restrict me so I can post nothing without his permission. If I am banned for good, then best wishes to those I, and Aran, have met. May your futures with your dolls be good ones.

User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by baphometric »

Socratus wrote: ↑Thu Mar 30, 2023 6:33 pm It's like seeing what sex dolls might actually be like if we ever develope the technology to make them react and act like real women during actual sex. Fascinating. Also kinda uncanny valley weird. I'm sure we'd adapt though.
Yeah! That's one thing I love about AI + sex dolls. It allows you to visualize them in other situations and contexts that they can't normally be in. It's like breathing life into your doll in a new way that I find really fascinating. It also is really stimulating my creativity and giving me new ideas for outfits and photo shoots.

Check out my AI art thread in my signature for more AI goodness!

User avatar
setevoltas
Super Moderator
Super Moderator
Posts: 8407
Joined: Sun Oct 28, 2018 3:03 am
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by setevoltas »

Realized this was possible reading some stuff last week. I think it's fascinating and could really help people who might be struggling to establish a connection with their doll.

Thanks for sharing Baph!
Sete's Gatas
Instagram - @setesartphotography

User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by baphometric »

setevoltas wrote: ↑Thu Mar 30, 2023 8:45 pm Realized this was possible reading some stuff last week. I think it's fascinating and could really help people who might be struggling to establish a connection with their doll.

Thanks for sharing Baph!
Absolutely! Just doing my part for the doll community, and for science :D

It's really something else, seeing algorithms bring our dolls to life. I can't wait to see what the future holds. This stuff is going to get easier and better over time.

cpbmix
Apprentice
Apprentice
Posts: 10
Joined: Sun Apr 09, 2023 11:11 pm
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by cpbmix »

Brilliant work, nicely written as well. I'll be keeping an eye on your work.

User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by baphometric »

cpbmix wrote: ↑Mon Apr 10, 2023 12:04 am Brilliant work, nicely written as well. I'll be keeping an eye on your work.
Thank you very much cpbmix!
Hopefully I'll try again soon.

User avatar
timetraveler1
Doll Visionary
Doll Visionary
Posts: 12332
Joined: Tue Apr 13, 2004 12:00 am
Location: u.s.a.
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by timetraveler1 »

those look bizarrely strange , looks like some android robot having sex !!

User avatar
baphometric
Moderator
Moderator
Posts: 836
Joined: Wed Oct 14, 2020 7:08 pm
Location: USA
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by baphometric »

timetraveler1 wrote: ↑Fri May 19, 2023 7:44 pm those look bizarrely strange , looks like some android robot having sex !!
Hah yeah there are some rough edges to work out still. It's not perfect, and so you end up in the uncanny valley. I think the methods for improvement I mentioned above would help. Sadly I just don't have much time to play around with this stuff, I've been more focused on the generative art side of things.

User avatar
timetraveler1
Doll Visionary
Doll Visionary
Posts: 12332
Joined: Tue Apr 13, 2004 12:00 am
Location: u.s.a.
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by timetraveler1 »

hey you tried something new , that's what counts and makes things interesting . i actually like deepfakes , and visit mr. deepfakes ( i think that was the name. it's interesting to see movie stars in porn that you wouldn't normally see.

User avatar
r363b
Doll Advisor
Doll Advisor
Posts: 580
Joined: Wed Feb 04, 2009 12:00 am
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by r363b »

Definitely interesting!

LJ69
Doll Elder
Doll Elder
Posts: 2778
Joined: Thu Oct 29, 2015 4:57 am
Contact:

Re: Making Deepfake Doll Porn (or any video)

Post by LJ69 »

Very interesting...

Post Reply

INFORMATIONS