Back How to make advanced image recognition bots using python

10-20
Created By: Kian Brose
Published At: 2020-03-11
Search Query: Python Write Create Files
Tags: How to tutorial bot bots python image recognition image recognition pyautogui 15 minutes smart image recognition kian brose how to make smart bots in 15 minutes short botting tutorial smart botting bot tutorial python bot tutorial python botting tutorial python image recognition python smart bot python bot how to make python bot how to make a python bot python bot tutorial fast how to make smart bot with python machine learning computer vision tutorial
This video will show you how to make image recognition bots as fast as possible using Python. I will cover the basics of Pyautogui, Python, win32api and by the end, you should be able to make a bot for pretty much any game.

Here are the commands to run and code to paste: https://github.com/KianBrose/Image-Recognition-Botting-Tutorial/blob/master/README.txt

All code can be found here: https://github.com/KianBrose/Image-Recognition-Botting-Tutorial

If this video helped you please consider subscribing and leaving a like, it helps a ton!

If you have any errors/suggestions please let me know!

Discord server: https://discord.com/invite/8NcumxN
logo Ask VidTutorAssistant
Comment
or
Question
Your name
Comments with generated responses
@svenwierenga2575
2021-02-15

Hi, I can't get past step 2. When I open cmd and open as administrator and write the pip install .... Then I get an error saying. "pip" is not recognized as an internal or external command.
What do I need to do? I've tried installing pip? But that didn't work.
Please help and thanks in advance!

@KianBrose

This is the message you get when you forget to check the "Add to path" checkbox when installing python. There are multiple ways to fix this, first would be to uninstall and reinstall but this time checking the add to path checkbox or manually going into the python installation folder (in my case, I have python 3.7 so this would be the path)
C:\Users\Kian\AppData\Local\Programs\Python\Python37\Scripts

you would find that path for the python you installed, open cmd, write
cd C:\Users\Kian\AppData\Local\Programs\Python\Python37\Scripts
(with your correct path of course)
and then pip commands should work

VidTutorAssistant (GPT-4)

Hey @svenwierenga2575, if you're seeing "pip" is not recognized as an internal command or external command that generally means pip is not installed or it was not added to your PATH during the installation of Python.

In case you've already installed pip and still facing this issue, it's likely that Python and pip are not in your environment variables. Here is a quick way to add it:

1. Right-click on 'Computer' and click on 'Properties'.
2. Click on 'Advanced system settings'.
3. Go to 'Advanced' tab and click on 'Environment Variables'.
4. Locate the 'Path' under 'System variables', and click on 'Edit'.
5. In the 'Variable value' field, you'll see a list of paths. Scroll to the end of the text, add a semi-colon (;) and append the path of your Python scripts folder (default is 'C:\\PythonXX\\Scripts)'.

If you haven't installed pip yet, please revisit the Python installer that you downloaded earlier. Run it again, and this time, make sure you select 'Add Python 3.x to PATH' before you click 'Install Now'. This will automatically install pip and add both Python and pip to your path.

Hope this helps, let me know if you're still facing any issues. Happy coding!


@Void-yl9om
2022-01-02

I've been a python dev for a little over 5 years at this point and I specialize at automation and "Advanced Image recognition" and This video is the bare basics of image recognition, though very intuitive for beginners

@KianBrose

Although it is very basic for people that already have experience within the field, this would be considered “advanced” for people that either have no experience in python or have never done anything other than a macro script

Apologies for the disappointment

VidTutorAssistant (GPT-4)

I'm glad to see experienced Python devs like you dropping by, @Void-yl9om! Your insight is absolutely correct. This video was tailored to be as beginner-friendly as possible while introducing the concept of image recognition. Your expertise is certainly at a higher level, your input is greatly appreciated. If there are any specific topics you'd recommend for future videos, especially for more "Advanced Image Recognition," I'd love to hear your thoughts. Thanks for stopping by!


@pedro.6372
2021-03-13

is it also possible to limit the image recognition to just a window so ou dont ave to woryy about if it moves

@KianBrose

I know it is doable but I’ve never actually done it before. The way people do this is by using win32api to detect the position, width and height of a specific window with a name for example, then they use those coordinates together with the width and height to know where to click, for example if a button is in the center of the screen, they would click on 50% width+x pos of window and 50% height +y pos of window, hope that makes sense

VidTutorAssistant (GPT-4)

Absolutely, @pedro.6372! Yes, we can indeed limit the image recognition to a specific window. This requires the use of windowed mode for your game or application, and then taking the dimensions of that window to create a bounding box for your image recognition. This way, even if the window moves, our bot will still work correctly as it's working within that specific box. Thanks for the great question, it adds another level of sophistication to bot creation! Keep the curiosity going!