<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[DaTabloid - Medium]]></title>
        <description><![CDATA[Entertaining data science for everyone - Medium]]></description>
        <link>https://medium.com/databloid?source=rss----bded13c65ac8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DaTabloid - Medium</title>
            <link>https://medium.com/databloid?source=rss----bded13c65ac8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:29:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/databloid" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[DeepFakes explained + Hottest girls on the net Part 2]]></title>
            <link>https://medium.com/databloid/deepfakes-explained-hottest-girls-on-the-net-part-2-cc72b74943e9?source=rss----bded13c65ac8---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc72b74943e9</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[entertainment]]></category>
            <category><![CDATA[databloid]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Viktor Tisza]]></dc:creator>
            <pubDate>Tue, 06 Feb 2018 10:21:55 GMT</pubDate>
            <atom:updated>2018-02-06T13:49:40.480Z</atom:updated>
            <content:encoded><![CDATA[<h4>Internet and deepfake are not just for porn but also serve as an excellent tool to make a reliable survey</h4><p>In the <a href="https://medium.com/@viktortisza/deepfakes-explained-hottest-girls-on-the-net-part-1-e60c67434f7">first part</a> of this post I explained the algorithm behind deepfake that is able to create highly realistic face swap on videos.</p><p>But many of you asked <em>“Okay, but where are the hot girls?”</em>. This second part will answer this question.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fc20UV66B7zCWA%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fc20UV66B7zCWA%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fc20UV66B7zCWA%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9486d4c5b9a2b59da6ee3a81526216a/href">https://medium.com/media/f9486d4c5b9a2b59da6ee3a81526216a/href</a></iframe><h4>How to find the hottest girls?</h4><p>It is a<strong> common problem in surveys that what people say is not always what they actually believe</strong>. Not because in any way they would intend to misguide us but simply because it is not always easy to quickly answer even a question that looks so simple like that. There are so many nice and famous girls out there how could we select in some seconds the best ones. Probably we can quickly select nice ones but I am not sure they would be really the most stunning ones.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FSDxzM5LAVq5Tq%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FSDxzM5LAVq5Tq%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FSDxzM5LAVq5Tq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="296" frameborder="0" scrolling="no"><a href="https://medium.com/media/6316402ee943d0597f9bfc9688344277/href">https://medium.com/media/6316402ee943d0597f9bfc9688344277/href</a></iframe><p>A good workaround for this problem if people have to make some effort before they can select their preferred solution. <strong>The bigger the effort the higher the chance that people will make very thorough and careful evaluation before they make their final decisions. </strong>In these cases even very small sample sizes can lead to better results than big surveys. A good example for this are the betting markets that are much better in predicting the outcome of certain events than surveys conducted on a much bigger sample. Here effort is represented by the money that we use to bet on certain outcomes. Certainly <strong>we are much more careful in making a decision when our money is on stake.</strong></p><p><strong>Not only money but also time can be considered as a kind of effort.</strong> And do you know <strong>what takes a lot of time? Creating deepfake videos.</strong> It can easily take 10–12 hours even on a computer with a decent GPU to produce one. Certainly you will think long what is really interesting for you or for your target audience before starting to create one. <strong>If we can somehow collect this data we will have a very good survey.</strong></p><p>My idea was to <strong>collect from the <em>deepfakes </em>subreddit all the post titles</strong>. From these titles we can <strong>extract the name of deepfaked persons, count</strong> them and create our <strong>rank</strong>ing.</p><h4>Show me the code</h4><p>Let’s see how can we do that <strong>in Python</strong> in one of the greatest (at least according to me 😄) all around programming language.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfQZX2aoRC1Tqw%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FfQZX2aoRC1Tqw%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeDQxc3BxdWh4YnF4cTdpNWRwOTh5YWpjbHRkZHFodGV3NDNkc3drdSZlcD12MV9naWZzX2dpZklkJmN0PWc%2FfQZX2aoRC1Tqw%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="246" frameborder="0" scrolling="no"><a href="https://medium.com/media/03b01b65ee85c80c743966622f1b848f/href">https://medium.com/media/03b01b65ee85c80c743966622f1b848f/href</a></iframe><pre>import praw<br>import pandas as pd<br>import re</pre><p>In Python we have a nice package for almost every tasks. We start with importing them:</p><ul><li>praw: to interact with Reddit</li><li>pandas: to have a convenient data format</li><li>re: regular expression to extract names</li></ul><pre>reddit = praw.Reddit(client_id=’my_id’,<br> client_secret=’my_secret’,<br> user_agent=’my user agent’)<br>titles=[]<br>for submission in reddit.subreddit(&#39;deepfakes&#39;).hot(limit=None):<br>    titles.append(submission.title)<br>name_pattern=re.compile(&quot;(?=([A-Z][a-z]+\s[A-Z][a-z]+))&quot;)<br>names=[name for title in titles for name in name_pattern.findall(title)]<br>print(&quot;{} name like strings ({} unique) out of {} titles extracted.&quot;.format(len(names),len(set(names)), len(titles)))</pre><blockquote>581 name like strings (443 unique) out of 988 titles extracted.</blockquote><p>Using praw we downloaded all post titles from the deepfakes subreddit. We assume that a name consist of two words where the first character of each word is capitalized and the rest is lowercase. We extract names with that pattern from the titles.</p><p>The net is crazy about Nicolas Cage but he is very often just referenced as Nic Cage. Let’s merge this two names since they represent the same person.</p><pre>nic_cage_count=sum([1 if (name==”Nic Cage”) else 0 for name in names])<br>nicolas_cage_count=sum([1 if (name==”Nicolas Cage”) else 0 for name in names])<br>names=[“Nic Cage/Nicolas Cage” if (name==”Nic Cage” or name==”Nicolas Cage”) else name for name in names]<br>print(“{} Nic Cage and {} Nicolas Cage found. {} altogether.”.format(nic_cage_count,nicolas_cage_count,sum([nic_cage_count,nicolas_cage_count])))</pre><blockquote>9 Nic Cage and 5 Nicolas Cage found. 14 altogether.</blockquote><pre>names=pd.DataFrame(data=names, columns=[“name”])<br>names=pd.DataFrame(names[“name”].value_counts().reset_index())<br>names.columns=[“name”,”count”]<br>names</pre><p>We use <strong>Pandas</strong> this awesome Python library to do <strong>data manipulation</strong> effectively. Certainly we can do it just using simple array operations but believe me it would be much longer and less elegant. (I actually did that first so you can really trust me on that…) In just one line we can count the names and order them.</p><h4>Finally the hot girls</h4><p>But now lets see the results (names and counts) that we all waited for so long.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*jBTEfuCOvbROR7QmFqmQqA.png" /></figure><ol><li><strong>Emma Watson (15)</strong></li><li><strong>Nic Cage/Nicolas Cage (14)</strong></li><li><strong>Daisy Ridley (12)</strong></li><li>Natalie Dormer (11)</li><li>Danielle Panabaker (6)</li><li>Scarlett Johansson, Grace Moretz, Gal Gadot (5)</li><li>Ariana Grande, Ivanka Trump, Emilia Clarke, Cara Delevingne, Taylor Swift, Natalie Portman, Maisie Williams, Sophie Turner (4)</li><li>Elsa Jean, Jessica Chastain, Donald Trump, Michelle Obama (3)</li></ol><p>Wow, <strong>Emma Watson is the hottest girl on the net</strong> according to the deepfake videos, big applause for her!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FcwHl87hujyFtS%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FcwHl87hujyFtS%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExM3Q0MW1tam01enVmMWUxenlkMThueml6ZTQ3MTl3dHNjMTNlcGV5NCZlcD12MV9naWZzX2dpZklkJmN0PWc%2FcwHl87hujyFtS%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="181" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ec4c57ff9b24de7fcefa227c505c23c/href">https://medium.com/media/8ec4c57ff9b24de7fcefa227c505c23c/href</a></iframe><p>But everyone&#39;s all time favorite <strong>Nic Cage is a really strong contender</strong>. Probably he is preferred for other skills than Emma.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FglvyCVWYJ21fq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FglvyCVWYJ21fq%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FglvyCVWYJ21fq%2Fgiphy-downsized-large.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="257" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa0b05fba2e9a97d3761a7999301ae12/href">https://medium.com/media/fa0b05fba2e9a97d3761a7999301ae12/href</a></iframe><p>Interesting to see that many actress playing <strong>super hero roles</strong> and from <strong>Game of Thrones</strong> got a high position.</p><p>The <strong>Trump family</strong> has two members in the top 8. In case of Ivanka it is probably more obvious than for Donald. <strong>Michelle Obama</strong> is the only other politician who could reach the top league.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FwJNGA01o1Zxp6%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwJNGA01o1Zxp6%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwJNGA01o1Zxp6%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="317" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ec9be4127bef8e4ebcbc32bbdd803e2/href">https://medium.com/media/4ec9be4127bef8e4ebcbc32bbdd803e2/href</a></iframe><p>Interestingly we have also a porn star here <strong>Elsa Jean</strong>. Probably her face was not inserted into the movies rather the other way around. (though it would be an interesting approach as well)</p><p>Wow, in just two short posts <strong>we’ve </strong><a href="https://medium.com/@viktortisza/deepfakes-explained-hottest-girls-on-the-net-part-1-e60c67434f7"><strong>understood how deepfake works</strong></a> and we have also seen an interesting solution how to utilize this data for a <strong>cheap and effective survey</strong>. (certainly <strong>not forget about the hot girls!</strong>) Good job, thanks for joining me on this journey!</p><p>Please <strong>clap 👏 👏 👏 if you enjoyed</strong> and <strong>follow me for more interesting posts</strong> where we <strong>have fun with the data </strong>out there and <strong>explore new ways to analyze them</strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc72b74943e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/databloid/deepfakes-explained-hottest-girls-on-the-net-part-2-cc72b74943e9">DeepFakes explained + Hottest girls on the net Part 2</a> was originally published in <a href="https://medium.com/databloid">DaTabloid</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeepFakes explained + Hottest girls on the net Part 1]]></title>
            <link>https://medium.com/databloid/deepfakes-explained-hottest-girls-on-the-net-part-1-e60c67434f7?source=rss----bded13c65ac8---4</link>
            <guid isPermaLink="false">https://medium.com/p/e60c67434f7</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[databloid]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deepfakes]]></category>
            <dc:creator><![CDATA[Viktor Tisza]]></dc:creator>
            <pubDate>Tue, 06 Feb 2018 10:19:04 GMT</pubDate>
            <atom:updated>2018-02-08T07:38:17.216Z</atom:updated>
            <content:encoded><![CDATA[<h4>How does the stunningly realistic face swap algorithm works? And how can we use it to find the hottest girls on the net?</h4><p>You may have already heard about <strong>DeepFake</strong> or if not then I’m sure you will hear about it very soon.</p><p>Not so long ago a reddit user called <em>deepfakes </em>posted some highly realistic but fake videos. Using a smart <strong>deep learning algorithm </strong>he<strong> swapped the faces of the original actors with some other famous persons</strong>. Yes, before you ask , it was adult content. As so many things in the history of humankind this great invention was also driven by t̶h̶e̶ ̶m̶i̶l̶i̶t̶a̶r̶y̶ porn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/0*96-nktHM5kVeWqLH.jpg" /></figure><p>Certainly its application area is much wider than simply producing stunningly realistic adult movies. I̶t̶ ̶a̶l̶s̶o̶ ̶i̶n̶c̶l̶u̶d̶e̶s̶ ̶p̶u̶t̶t̶i̶n̶g̶ ̶N̶i̶c̶ ̶C̶a̶g̶e̶ ̶t̶o̶ ̶e̶v̶e̶r̶y̶ ̶m̶o̶v̶i̶e̶s̶!̶ Do you remember for some of the latest tragic deaths of Hollywood actors and how challenging and expensive it was to finish their latest movies afterwards? Using <strong>deepfakes</strong> these tasks can be done easily at home on a desktop computer in hours in an extremely high quality.</p><h3>DeepFakes explained</h3><p>So how does this great algorithm works? We can break it down into 3 major steps:</p><p>(0. Collect pictures about your to-be-faked target person and selecting a video to be modified)</p><p>1. Align</p><p>2. Train</p><p>3. Merge</p><h4>Align</h4><p>We only want to swap faces so our first step must be to identify faces on pictures. Once we found their position we can also identify their orientation and size. Using this information we can warp all picture to a general format.</p><p>Face detection is a traditional machine learning problem. One common way to do that is to use the Histogram of Oriented Gradients (or simply <strong><em>HOG</em></strong>). This method looks at each pixel of our picture and compares its darkness to the surrounding pixels. Then we can draw an arrow (meaning <em>gradient</em>) from the lighter to the darker points. We will use this representation of our original images. There is a HOG pattern that was trained on thousands of faces. We can compare it to our converted images to find areas that are very similar thereby identifying faces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*6xgev0r-qn4oR88FrW6fiA.png" /><figcaption>Source: <a href="https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78">https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78</a></figcaption></figure><h4>Train</h4><p>Using our extracted face pictures we can train an autoencoder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*cxMZpo_-vOtgOKa5." /></figure><p>Autoencoder is a type of neural network (the computational system behind deep learning). Its input is a picture and its output is the same picture. Doesn’t make any sense, right?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FEsmlrgWNx5v0Y%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FEsmlrgWNx5v0Y%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FEsmlrgWNx5v0Y%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="392" frameborder="0" scrolling="no"><a href="https://medium.com/media/9827aafef69975142afa4a39ad183ff2/href">https://medium.com/media/9827aafef69975142afa4a39ad183ff2/href</a></iframe><p>Autoencoders consist of 2 parts: an encoder and a decoder. Encoder learns a much shorter representation of the input data while the decoder is able to transform it back to the original data. So encoder compress the data into a shorter size and decoder translate is back to the original longer format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Gtpl-oeGhQNkdmu_.jpg" /><figcaption>Source: <a href="https://blog.keras.io/building-autoencoders-in-keras.html">https://blog.keras.io/building-autoencoders-in-keras.html</a></figcaption></figure><p>We train our model on our target pictures so our network will learn only how to encode a short representation into our target persons’s face. It means even if our input will be a different face our model will convert it into the original person’s face.</p><p>Now we can identify faces in our target video (video is just a bunch of pictures) then run them through our trained model converting the original actor to the target person.</p><h4>Merge</h4><p>In this phase we will take the new pictures created by the autoencoder. In the alignment phase we saved their original orientation and size so doing some backward engineering we can put them back into the original picture. Out of the modified pictures we can recreate our video.</p><p>And that’s all, our new deepfake video is ready.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*fDu7R8yeax6--EeE.jpg" /></figure><p>Certainly there are some more bells and whistles here and there but the basic algorithm works simply like this.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxUPGcqeQjKzeWRxX8s%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FxUPGcqeQjKzeWRxX8s%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FxUPGcqeQjKzeWRxX8s%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="330" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5764d955017f8f7d74d5116a3faf7a8/href">https://medium.com/media/b5764d955017f8f7d74d5116a3faf7a8/href</a></iframe><p>Where are the hot girls you might ask? <a href="https://medium.com/@viktortisza/deepfakes-explained-hottest-girls-on-the-net-part-2-cc72b74943e9"><strong>Check out part 2</strong></a><strong> </strong>of this article and you will get know it. 😉</p><p>Would you have any question about the details, feel free to <strong>ask it in the comments</strong>. Also<strong> clap</strong> 👏 👏 👏 and <strong>share</strong> if you liked the post so maybe more <strong><em>data lover</em></strong> will find the article. Don’t forget to <strong>follow me</strong> for more interesting content on the data field.</p><p><em>References:</em></p><ul><li><a href="https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78">Machine Learning is Fun! Part 4: Modern Face Recognition with Deep Learning</a></li><li><a href="https://www.reddit.com/r/deepfakes/">reddit.com: over 18?</a></li><li><a href="https://github.com/deepfakes">deepfakes</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e60c67434f7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/databloid/deepfakes-explained-hottest-girls-on-the-net-part-1-e60c67434f7">DeepFakes explained + Hottest girls on the net Part 1</a> was originally published in <a href="https://medium.com/databloid">DaTabloid</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>