AI Plays HTML5 Game FastWords. Destroys All Competition with OPENCV and Python.

Sdílet
Vložit
  • čas přidán 5. 07. 2021
  • Today we learn some new concepts in computer vision by beating games. This provides a great way to watch AI play games as well as improve your programming skills. Python and OpenCV will be our tools of choice to try and take down this high score.
    github.com/ClarityCoders/Fast...
    Want to chat with me and other programmers join our discord!
    / discord
    #Python #OpenCV #ClarityCoders
  • Věda a technologie

Komentáře • 145

  • @counterstrike1source
    @counterstrike1source Před 3 lety +81

    Really like your content , one suggestion: add a time multiplier when you speed some footage up to let the viewer know by how much you are speeding it up.

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +32

      Noted and I'll have one next time. Thanks for the suggestion and the view/comment I really appreciate it.

    • @rhmagalhaes
      @rhmagalhaes Před 2 lety +5

      Or... You can make a program that reads the speed of regular video by calculating the pixels/second and give the speed when it accelerates... 🤣🤣🤣

  • @felixschndr
    @felixschndr Před 3 lety +15

    I just found your channel about a week ago, instantly subbed and am happy to see your subscriber count rapidly growing.
    Posting the complete code is so nice. I wish more people would do this! ♥

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Anytime love me or hate me it's an open book! Thanks for watching I appreciate it.

  • @laupetre
    @laupetre Před 3 lety +7

    I've just discovered your channel today. Your approach to teaching OpenCV and Python is something I've been trying to toy with. Looking forward to watching your videos.

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Awesome thanks for watching and commenting. Glad to have some new faces in the comments!

  • @wizard-cs2st
    @wizard-cs2st Před 2 lety

    great editing and content, really enjoyed when you just showed the code snippet on the screen opposed to the whole script.

    • @ClarityCoders
      @ClarityCoders  Před 2 lety +1

      Thanks! It's a balancing act on how much to show honestly. Appreciate the view and comment.

  • @anthonybuchholz1364
    @anthonybuchholz1364 Před 3 lety

    damn bro, these vids are awesome. can tell you gonna blow up if you keep this up

  • @sgt391
    @sgt391 Před 2 lety

    Learning a lot thanks to your videos! Love the content too

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      Awesome! Good to hear thanks for watching and commenting.

  • @ashikat413
    @ashikat413 Před 2 lety

    comment for engagement vuv
    I love content like this, please keep uploading

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      Means a lot thanks for taking the time to comment! I'll keep uploading.

  • @bishop5737
    @bishop5737 Před 3 lety

    "Also had some comments that said I should stop putting my face on the videos... Well I'm gona put my face on the videos even harder now." lmao
    Really happy I found you, I hate you are not more popular but also not, good knowledge for just a few of us :D
    Keep it up!

  • @sanfarans
    @sanfarans Před 3 lety +1

    Quality content, keep it up

  • @daddyofalltrades
    @daddyofalltrades Před 3 lety +1

    Wow really great stuff. Thank you ❤️

  • @CasperA
    @CasperA Před 3 lety

    You make really amazing content!

  • @bkalajy
    @bkalajy Před 3 lety

    You really made AI learning more interesting than it is thx and keep it going 😁🌷

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Thanks for watching and commenting. I'll keep going!

  • @mateladik8579
    @mateladik8579 Před 3 lety

    Hey Man! Real nice content. I'd like to ask you, that there is a game called,,Metin 2" which is based on the need to select, knock down stones. And from the items you received you can increase your damage and skill level to deal more damage. Millions of people play with it, and with opencv object detection it woub help people to save weeks of endless farming and grinding. As a new content video would you consider making a short help video or something to make an auto farming bot program for that game? Thank you in advance for your answer. Keep it up!

  • @user-jl7xw1oq5v
    @user-jl7xw1oq5v Před 3 lety +1

    Great video

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Thanks you for watching and commenting. I'll keep doing more I think!

  • @zhichen5620
    @zhichen5620 Před 3 lety

    Great Video! Can you make a tutorial on fastai GPU setup? It is fine to use colab for learning but it's such waste if you have a GPU but don't know how to use it.

  • @rajnichouhan4649
    @rajnichouhan4649 Před 2 lety

    Hi, I am new to your channel and just subscribed because you are soooo good, can you tell me which IDE do u use the most?

  • @Mr_Stork
    @Mr_Stork Před 3 lety +1

    Wow nice usage of opencv :)

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      It's a cool library to play around with for sure! Thanks for watching / commenting.

  • @thekernelpanic3320
    @thekernelpanic3320 Před 2 lety

    great video! funny how we can learn python easily hacking things. thx!

  • @Val_Loves_En
    @Val_Loves_En Před 3 lety

    Nice one)

  • @Foxyy01
    @Foxyy01 Před 3 lety +2

    Outro song: Run - Hectorino Martinez

  • @herrjohnssen
    @herrjohnssen Před 3 lety

    Can you make a bot which plays "like a dino"? Would be interesting to see how fast it can go

  • @unitywithneo
    @unitywithneo Před 3 lety

    For more precision to the detection of letter, it is possible to use a grey image and only take the pure black in the yellow zone?

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Would be interesting I could see that improving performance.

  • @zippyholland3001
    @zippyholland3001 Před 3 lety

    Nice 👍

  • @zakyvids6566
    @zakyvids6566 Před 3 lety

    These videos are awesome can you please make a video on python crash course please

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      I have it on my list for a tutorial series covering a different and hopefully more fun way to learn Python. Look for it soon.

  • @pizzamark4388
    @pizzamark4388 Před 3 lety

    nice vid i liked it

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      Thanks Mark that really means a lot. Thanks for watching.

  • @austinschaffer7854
    @austinschaffer7854 Před 3 lety +5

    Nice solution! What caused the program to fail at the end? Did it pick the wrong letter accidentally due to the acceleration of the letters? Did it accidentally grab a misspelling of the input word that it wasn't able to spellcheck?

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      It had an extra letter from the previous word I can't remember specifically. It was like "SONG" and the program saw "SONGS". So it waited for an S that never came and timed out.

  • @user-ke3hh4fv3k
    @user-ke3hh4fv3k Před 3 lety

    What was that for music at the end?

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      Fast and Run - Nico Staf. Thanks for watching and commenting!

  • @wilwilson8146
    @wilwilson8146 Před 2 lety

    That things called a tillday? I always thought it was called a curly bird..
    I am so learned.

  • @mehregankbi
    @mehregankbi Před 3 lety

    interesting video. do you have a beefy pc?

  • @sumarto9822
    @sumarto9822 Před 3 lety

    I already try to implement Template Matching on my case, so far it is work, but i have problem when using gui, instead of using terminal to start the program, i tried to make gui and a button to start the logic. Did you have guide make gui to start the logic of the program ?

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      I didn't create a GUI for this program at all. I just started it from Visual Studio Code. In VSC if you have an env you need to set the interpreter before you can use the green play button.

    • @sumarto9822
      @sumarto9822 Před 3 lety

      @@ClarityCoders i already solved my problem haha, i am motivated to learn python when watching your videos xd

  • @anmjeenpk843
    @anmjeenpk843 Před 10 měsíci

    hey bro now you in china? chengdu ? xihua ?

  • @enderinvader
    @enderinvader Před 3 lety +2

    The Kick Ya Chop record has been topped again, broke the 3000's with 3153

  • @limtis
    @limtis Před 3 lety +3

    Tesseract is pretty slow by itself. You have the whole alphabet screenshotted, wouldn't it be faster to use template matching with some opencv (greyscale, sharpen, resize) to read the words? You'll have less errors as well, probably
    Edit: btw, the game probably uses NASPA word list, maybe we can do smth with it? 🤔

    • @limtis
      @limtis Před 3 lety +3

      Also, you could've used
      str_var = "".join(i for i in str_var if i.isalpha())
      instead of using regex, but that's a matter of preference

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +2

      So slow. Only used here because it's simple and speed wasn't needed. All very good points I'll keep them in mind. Thanks for the feedback / commenting.

  • @hugoyaztromo3532
    @hugoyaztromo3532 Před 2 lety

    yessss OpenCV beefcake KINGGG. show em those guns and don't let them tell u to hide ur face!
    more tank tops in next content pls 🤤 👉👈 🥺

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      Hugo my man! Thanks for commenting I'll keep my face on things we make the rules here! haha

  • @aks9545
    @aks9545 Před 3 lety

    Looks dope , also why the fuck do you have such little subs

  • @gaming_noob8032
    @gaming_noob8032 Před 3 lety

    You should try to make an ai system that will speed run deepest sword

  • @Sadbloodclasher
    @Sadbloodclasher Před 2 lety

    5:45 Diagonal word

  • @inkco420
    @inkco420 Před 2 lety

    Is this an AI or simple bot?

  • @joshuaolsen8844
    @joshuaolsen8844 Před 3 lety

    Algo

  • @thejasgowda9295
    @thejasgowda9295 Před 2 lety

    I nee your help

  • @bean0_099
    @bean0_099 Před 3 lety

    Can you beat a game with q Learning

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      I am thinking within the next two videos stay tuned.

  • @adispenser
    @adispenser Před 3 lety +1

    stretching it to 8 minutes I see (I'm not complaining)

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      I just want to spend more time with you guys. Thanks for watching and commenting I appreciate it.

    • @adispenser
      @adispenser Před 3 lety

      @@ClarityCoders I appreciate your content too I have learnt a lot from it.

  • @sasilverain
    @sasilverain Před 3 lety

    put your face on all the things! :D :D

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      I put this comment on my new video out today. haha

  • @ccuuttww
    @ccuuttww Před 3 lety

    OPENCV terminator

  • @freezerain
    @freezerain Před 3 lety

    bro making screenshots of every letter? Comon you are a coder.
    1) Get screenshot of the word
    2) Chunk it up on the number of letters openCV detected
    3) greyscale chunk, contrast it to get pure black&white colors thus recieveing only shape of the letter
    4) Trimm image to get rid of background around letter
    5) Success

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      Yeah have to figure out width of letter to chuck? Good option though.

    • @freezerain
      @freezerain Před 3 lety

      @@ClarityCoders If total width is 500 pixels and openCV fount word "dog" then letter width is 500/3

  • @DumbFishes
    @DumbFishes Před 3 lety

    Here is a tip do some thing more cool like creating a video game and put a lot of memes in it

    • @ClarityCoders
      @ClarityCoders  Před 3 lety

      That does sound really cool! Thanks for watching and commenting.

  • @eliebordron5599
    @eliebordron5599 Před 3 lety

    Add your face as much as you want on the videos. I mean, they're yours

  • @nikhildon9882
    @nikhildon9882 Před 3 lety +1

    Fruit ninja game python ai bot

  • @Zachucks
    @Zachucks Před 2 lety

    I want to like this video, but the likes is at 666 so i can't

    • @ClarityCoders
      @ClarityCoders  Před 2 lety

      I respect that decision 100%. Thanks for commenting and watching!

  • @CallousCoder
    @CallousCoder Před 3 lety

    Python....Amateur ;) Real programmers use OpenCV with C++ :)
    Python is a Millenials disease. Slow... ugly syntax and did I saw slooooow.
    But seriously: Template matching is a fast approach. But you can do it probably faster and so much easier. The letters are a high contrast on black. So you can easily extract them with a threshold and a difference with an empty frame (as this doesn’t change).
    And feed those into an OCR algorithm. Then you don’t need to cut and paste and do relatively expensive pixel for pixel shifts to match templates.

    • @ClarityCoders
      @ClarityCoders  Před 3 lety +1

      My first language was C++ back in the day for sure much faster. All good points love feedback like this thanks for watching / commenting.

  • @kopuz.co.uk.
    @kopuz.co.uk. Před rokem

    OpenCV is overkill for html5 games, selenium would be faster for this.

  • @songsong961
    @songsong961 Před 3 lety +1

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety +1

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot

  • @songsong961
    @songsong961 Před 3 lety

    Fruit ninja game python ai bot