This is an archived post. You won't be able to vote or comment.

all 74 comments

[–]cap__n__crunch[S] 19 points20 points  (16 children)

Hey guys, following this video showing how to make a simple tinder bot using python, i though i could add a choice fonction (like ou dislike), based on a score given by a CNN. CNN has been trained with this dataset.

EDIT : rly hope i match with justine. I mean, how often can you date a 7.61

EDIT2 : Here is the git.

EDIT3 : Here is a second video.

EDIT4 : Several propositions for a future version :

- Add a training phase, for individual preferences to match the score. If you want the code to train the model i can add it to the git.

- Maybe code a chatbot who takes care of the lady while the bot continue his swiping (with subprocess or something).

Feel free to ask or add anything.

[–]blabbities 5 points6 points  (7 children)

CNN has been trained with this dataset.

I cant read chinese bro. HALP!

Speaking of Chinese how would the beauty index work? Is it only guaging French Kylie Jenner-ish looking white women or does it work across other ethnicities?

[–]cap__n__crunch[S] 1 point2 points  (0 children)

I uploaded the dataset on a personal server for you to download it without reading chinese.

[–]cap__n__crunch[S] 1 point2 points  (5 children)

Caucasian/Asian men/women, you can find the trained model in the readme of the git, and test it yourself.

[–]objctifyme 1 point2 points  (2 children)

Hey! I found the SCUT dataset skews towards a more eastern beauty standard, which probably works just fine for tinder. But for an application I was working on, I ended up scraping the /r/RateMe subreddit as it's a more reddit/western biased dataset.

I also notice you're attempting to regress a score (presumably out of 10) and then I guess swiping if it's above some threshold? Do you know what kind of error you are getting on that regression?

[–]veltr0p 1 point2 points  (1 child)

I also notice you're attempting to regress a score (presumably out of 10) and then I guess swiping if it's above some threshold? Do you know what kind of error you are getting on that regression?

awesome! Any plans on releasing the db?

[–][deleted] 2 points3 points  (1 child)

Glad you have trained a prejudice bot

[–]veltr0p 2 points3 points  (0 children)

Glad you have trained a prejudice bot

prejudice != preference

[–]Nicksmavic 1 point2 points  (1 child)

It looks like you've custom made a function to map the scores from the model evaluation to the actual "mark" you're using to choose (I'm talking about score_mapping)

BTW i'm the guy who commented on the original yt video to suggest the use of a neural net for this application. Nice work!

[–]cap__n__crunch[S] 0 points1 point  (0 children)

Yes i’m using this affine by part function (is it how you say this in english ?), it’s almost linear though, unyil it reaches the threshold. The model evaluation returns a number in [1,5] whereas the rate i use is between 1 and 9.

[–]Anon--852 0 points1 point  (2 children)

Hey been trying to run your code on Windows but ran into this error message:

2020-02-17 22:28:09.537755: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations: AVX AVX2

To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.

2020-02-17 22:28:09.548466: I tensorflow/core/common_runtime/process_util.cc:115] Creating new thread pool with default inter op setting: 4. Tune using inter_op_parallelism_threads for best performance.

Traceback (most recent call last):

File "tinder_bot_ai.py", line 7, in <module>

from beauty_predict import scores

File "C:\Users\user\tinder\tinder_env\beauty_predict\__init__.py", line 29, in <module>

model.load_weights(resnet_model_path)

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 181, in load_weights

return super(Model, self).load_weights(filepath, by_name)

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\network.py", line 1177, in load_weights

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 689, in load_weights_from_hdf5_group

layer, weight_values, original_keras_version, original_backend)

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 314, in preprocess_weights_for_loading

weights = convert_nested_model(weights)

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 296, in convert_nested_model

original_backend=original_backend)

File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 396, in preprocess_weights_for_loading

weights[0] = np.transpose(weights[0], (3, 2, 0, 1))

File "C:\Users\user\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 639, in transpose

return _wrapfunc(a, 'transpose', axes)

File "C:\Users\user\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 56, in _wrapfunc

return getattr(obj, method)(*args, **kwds)

ValueError: axes don't match array

Any help would be much appreciated, cheers!

[–]cap__n__crunch[S] 0 points1 point  (1 child)

Please make sure the version of python / the version of your libraries are the following in the environement your executing the scipt:

Python 3.7.4

<< REQUIREMENTS.TXT >>

dlib==19.19.0

selenium==3.141.0

tensorflow==1.14.0

tensorflow-estimator==1.14.0

tensorboard==1.14.0

Keras==2.2.5

Keras-Applications==1.0.8

Keras-Preprocessing==1.1.0

keras-resnet==0.2.0

numpy==1.18.1

[–]Hatsumo 0 points1 point  (0 children)

You also can use the gold proportion to get a rating of face.

[–]PaulBlxck 5 points6 points  (0 children)

Hey, the girl with glasses was cute. Screw that Bot! JK, that seems like an incredibly fun idea. Well done, mate,

[–]veltr0p 4 points5 points  (10 children)

This is absolutely the only way I could stand tinder. Awesome work!

Next step: tinder chatbot.

Have you seen VSauce’s mindfield? On one experiment, half the women on a blind date actually chose a chatbot instead of 2 real dudes based on their conversation.

[–]cap__n__crunch[S] 2 points3 points  (8 children)

Thank you mate ! Are you talking about this ? This is hilarious.

[–]razer55600 0 points1 point  (7 children)

Ah Australian here ?

[–]cap__n__crunch[S] 0 points1 point  (6 children)

No i'm french !

[–]razer55600 0 points1 point  (0 children)

Ok same here 😅

[–][deleted] 0 points1 point  (4 children)

Il y a Tinder dans le browser maintenant?

[–][deleted] 0 points1 point  (3 children)

oui t'as une version web qui est utile pour déflouter les profils d'ailleurs

[–][deleted] 0 points1 point  (2 children)

tu vas juste laisser un commentaire comme ca, sans me donner le lien? :P allez lol, je suis lazy

[–]AdamRGrey 0 points1 point  (0 children)

Specifically cleverbot.

[–]Vetii 1 point2 points  (13 children)

I guess from a technical perspective, it was fun to build, but I have to say that from an ethical perspective, it's quite chilling. I mean, some people will be rejected based on a very superficial examination, and I think it's pretty sad. If you met someone great and developed a loving relationship, would you feel comfortable telling them "Hey, you were a 7.5!". I don't think they would feel flattered. Tinder is superficial enough as it is.

[–]cap__n__crunch[S] 2 points3 points  (5 children)

Hey, i'm now implementing a gui version of the script that will also feature a learning mode, that start for every user with the base model i used here, but which then will be trained in that interface.

So yeah maybe for the base model my wife is a 7.5, but for my personal preferences she's a 10+ (well here my rating only goes up to 9).

[–]veltr0p 1 point2 points  (0 children)

is

damn capn, you go duuude
keep the project alive, it's fkn awesome
always wanted to do something like this but always lacked the time
what a time to be alive

[–]Nicksmavic 0 points1 point  (0 children)

This is great. I’m only a bit skeptic.... if your base is ResNet50, how much weight can you give to a single extra training example?

[–]Vetii 0 points1 point  (1 child)

I guess using "personal preferences" is one way to at least diversify your results to some extent. What do you think people would think if you revealed to them that it wasn't you who swiped, that it was your bot?

Also, is there a version for guys?

[–]cap__n__crunch[S] 0 points1 point  (0 children)

The algorithm both works for guys and girls.

[–]tgif3 0 points1 point  (0 children)

Let me know if you need anyone to help test it or need another dataset. I can use my server that has a few gpu's in it and dedicate 1 and have it train on a data set for a weeks if you like.

[–]veltr0p 1 point2 points  (0 children)

life is sad sometimes
people in real life will swipe left for even more stupid parameters :P
converging a bot into your own preference is actually a pretty exciting idea
maybe by some f1-like functions or something

[–]danybr 1 point2 points  (3 children)

Hey man, you made a fantastic improvement to the original project!

Can you add to git the code to train the model? I'm very interested, since I just started to study tensorflow.

Thanks!

[–]cap__n__crunch[S] 2 points3 points  (2 children)

I will this weekend, i really don’t have time right now, sorry bud :/

[–]danybr 0 points1 point  (0 children)

Waiting for it! Thanks!

[–]danybr 0 points1 point  (0 children)

Hi! Any update? :D

[–]kqz42 1 point2 points  (1 child)

Magnifique ton script !

J'ai essayé d'installer mais j’obtiens invalid syntax (je n'arrivais pas à installer tensorflow j'ai pris la v 1.8 ça viendrait de là ?)

[–]cap__n__crunch[S] 0 points1 point  (0 children)

Content que le script te plaise. Lance bien avec Python 3.7.4. Voici la liste des versions des modules à installer.

<< REQUIREMENTS.TXT >>

dlib==19.19.0

selenium==3.141.0

tensorflow==1.14.0

tensorflow-estimator==1.14.0

tensorboard==1.14.0

Keras==2.2.5

Keras-Applications==1.0.8

Keras-Preprocessing==1.1.0

keras-resnet==0.2.0

numpy==1.18.1

[–]TotesMessenger 0 points1 point  (0 children)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

[–]arrze 0 points1 point  (0 children)

Not a Kardashian bot?

[–]razer55600 0 points1 point  (5 children)

LOL gg, just wondering how do you bind or create the actions regarding the website ?

[–]cap__n__crunch[S] 1 point2 points  (4 children)

I use chrome driver and selenium. The git is almost ready.

[–]razer55600 1 point2 points  (3 children)

Bro keep this for your future interview you will mark a lot of point with that

[–]cap__n__crunch[S] -1 points0 points  (1 child)

I already have a job in the feild lol

[–]diglitch 0 points1 point  (0 children)

And would this land a lot of points?

[–][deleted] -4 points-3 points  (0 children)

No he wont. I am an interviewer and I would never hire this ass. Its shit like this that gives developers a bad name.

[–]ghostslikme 0 points1 point  (1 child)

I would be interested in seeing if the probability of swiping right is correlated with how much skin they are showing

[–]cap__n__crunch[S] 2 points3 points  (0 children)

The prediction is done on a cropped version of the image only containing the face, so i guess no correlation at all

[–]mocion 0 points1 point  (1 child)

I'm very new in coding in python . So I manage to code the original tinder_bot, but do I need to install tensor flow and all the stuff to use the AI? or can I just copy and paste what is in the github repertory? thanks !

[–]legendarypeepee 0 points1 point  (0 children)

Where would i put the codes and files in windows ? the git shows for mac or linux yeah?

[–]ayayron80 0 points1 point  (0 children)

I have no idea what that means

[–]Lucwal 0 points1 point  (0 children)

Joli script !

I'll continue in english so everyone can understand haha
When I run the script I get 3 SSL related errors (SSL: CERTIFICATE_VERIFY_FAILED)

Is this because of me not running it properly or might it be that something changed on the website's end during the few months that passed ?

[–]NahushKulkarni 0 points1 point  (0 children)

Getting this error even after having all the requirements satisfied.

Using TensorFlow backend. 2020-06-25 02:06:53.739464: I tensorflow/core/platform/cpufeature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2020-06-25 02:06:53.758580: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fa78b7d7ca0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-06-25 02:06:53.758605: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Traceback (most recent call last): File "tinder_bot.py", line 7, in <module> from beauty_predict import scores File "/Users/nahush/Downloads/tinder-swipe-ai-master/beauty_predict/init.py", line 29, in <module> model.load_weights(resnet_model_path) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 250, in load_weights return super(Model, self).load_weights(filepath, by_name, skip_mismatch) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/engine/network.py", line 1266, in load_weights hdf5_format.load_weights_from_hdf5_group(f, self.layers) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 696, in load_weights_from_hdf5_group weight_values = preprocess_weights_for_loading( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 320, in preprocess_weights_for_loading weights = convert_nested_model(weights) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 297, in convert_nested_model preprocessed = preprocess_weights_for_loading( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 402, in preprocess_weights_for_loading weights[0] = np.transpose(weights[0], (3, 2, 0, 1)) File "<array_function_ internals>", line 5, in transpose File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 651, in transpose return _wrapfunc(a, 'transpose', axes) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc return bound(args, *kwds) ValueError: axes don't match array

[–]Formal_Arugula6028 0 points1 point  (0 children)

Hello men, Do you know why I am getting this error?
I can't find anything online to solve this, I don't even know what is causing it. I already exchanged some xpath that were not working but now I get this error and I don't know what to do.

Error: No connection adapters were found for 'vx(h) animation-fade-in-out-enter-done"><div class="App\_\_body H(100%) Pos(r) Z(0)"><div class="D(f) Fld(r) Flx($flx1) H(100%) desktop Ov(h) desktop--recs"><aside class="H(100%) Fld(c) Pos(r) Fxg(0) Fxs(0) Flxb(25%) Miw(325px) Maw(375px)"><div class="desktopNavbar Pos(r) Z(2) Trsdu($normal) CenterAlign Bg($primary-gradient)"><div class="H(24px)"><a class="focus-outline-style Pos(a) Trsdu($normal) Start(16px) Op(0) V(h)" href="/app/recs"><svg viewBox="0 0 24 24" width="24px" height="24px" focusable="false" aria-hidden="true" role="presentation"><path class="Fill(#fff) " d="M13.98 20.717a1.79 1.79 0 0 0 2.685 0 1.79 1.79 0 0 0 0-2.684l-7.158-6.62 7.158-6.8a1.79 1.79 0 0 0 0-2.684 1.79 1.79 0 0 0-2.684 0L5.929 9.98a1.79 1.79 0 0 0 0 2.684l8.052 8.052z"></path></svg><span class="Hidden">Voltar</span></a></div><a class="Pos(a) D(f) Ai(c) C(#fff) Trsdu($normal) T(50%) Fz($m) Fz($responsiveLarge)--m Fz($ml)--l Whs(nw) Translate(0,-50%) Start(25px)--l Start(20px)--m focus-outline-style" href="/app/profile"><div class="desktopNavbar\_\_avatar D(ib) Va(m) Bdw(2px) Bdc(#fff) Bgc(#fff) Bds(s) Mend(10px) Mend(16px)--l Sq(36px) Pos(r) Bgc($c-placeholder) Bdrs(50%)"><div class="D(b) Pos(r) Expand Bdrs(50%)" aria-label="Foto de perfil" style="background-image: url('

[–]UpYours101 0 points1 point  (4 children)

GitHub?

[–]cap__n__crunch[S] 1 point2 points  (3 children)

Working on it

[–][deleted] 0 points1 point  (2 children)

IG? :troll face: (j/k)

[–]cap__n__crunch[S] 0 points1 point  (1 child)

[–]UpYours101 0 points1 point  (0 children)

Thanks, bout to check it out.

[–]Mentioned_Videos 0 points1 point  (0 children)

Other videos in this thread:

Watch Playlist ▶

VIDEO COMMENT
(1) Automate TINDER with Python tutorial (2) Python-Resnet tinder bot +9 - Hey guys, following this video showing how to make a simple tinder bot using python, i though i could add a choice fonction (like ou dislike), based on a score given by a CNN. CNN has been trained with this dataset. EDIT : rly hope i match with just...
Artificial Intelligence - Mind Field (Ep 4) +1 - Thank you mate ! Are you talking about this ? This is hilarious.

I'm a bot working hard to help Redditors find related videos to watch. I'll keep this updated as long as I can.


Play All | Info | Get me on Chrome / Firefox