THIS IS THE BEST TUTORIAL ON IN-SCREEN OBJECT DETECTION. PERIOD. Simplified and provides a base from which more things can be explored. Thank you for your efforts. I subbed and liked it. 🍻😊😊
As a software developer I thank you for how well this was made, it gave me a very good baseline to work with and was overall extremely well thought out, you earned my sub!
owwwwwww dude Here is the training that I have been looking for for a year and could not find, you are the only one, please do not give up on the training and I will be waiting for the continuation, I am starting now. thxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Holy moly, it works. Thank you so much my friend. I did everything you said, exactly as you did and it works for a 3D game. I'm still stoked on how it works, but it's awesome anyway. Thank you so much my friend!!!
Hi there, thank you for your comment! A few months ago I was working on a bot for Ragnarok Online, but I was having a hard time finding online content showing how to create a object detector and make the detection results available in Python. So, when I created my one, I decided to try making a video about it (this video), I didn't expect to have such a good reception. I'm very happy that it worked and was useful for you!
@@moisesdepaulodias7980 that was what I wanted to do. I started with template matching from OpenCV, but it didn't worked quite good and I started looking through using OpenCV for object detection but couldn't find something so easy as what it is in this video. The only issue that I encountered, is that the model is a bit delussional and makes detection of other objects, but I will train another model after I finish with implementing all the things for my bot. Thank you very much. Also, do you know any resources for learning OpenCV. I'm a programmer, but I haven't looked through a lot of resources, what do you recommend for starting up with OpenCV
I followed the tutorial step by step until the end, and I must say it was incredibly simple. You explained everything so clearly, basically you did all the job I only had to label the dataset. Thank you so much for the great work! This makes me want to dive deeper into the AI/Bots/Automation topics.
I was losing fate in image detection projects after more than two years of researching to get this video by RUclips recommendation thank you man you open new world for us
It worked for me, i used 350 images and Diablo 3 as example. I love you so much, you just helped me a lot with a project i had in mind!!! Keep the channel up!
@@joaoaugusto6325 dar até da, porem esbarra num problema de fps, sua placa de video tem que ser muito boa pra gravar a tela, rodar o modelo de ia, e o codigo para mecher o mouse, caso o fps da gravacao da tela seja ruim, o modelo da as coordenadas x e y atrasadas, dai o aimbot nao funciona bem, precisa de um hardware bem potente, ou usar os modelos de menor precisao do yolo, mas ai o aim fica pior.
This is so clear, i have search tutorial for object detection but didnt get the clear info or maybe im stupid so that i cant understand😅, but not for your tutorial, this is really clear for me, i can digest each of information/step, you really put big effort to make this tutorial man. Thanks alot bro. Subss.....🤜🤛
Cool tutorial. I wanted to ask, the images that is being captured on the generate dataset notebook only shows black pictures. I am using it on a browser game. Already tried using different browsers, but it still has the same output of only capturing black images. Is there a fix for this? Thank you :D
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well). I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator. I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
I encountered the same issue. It turns out it’s not related to anti-cheat mechanisms, but rather an operating system security feature when you try capture a specific window. Even using "Calculator" as an example didn’t work. However, I managed to adapt the code to take screenshots using pyautogui instead of pywin32. This adjustment doesn’t affect the performance of the code significantly, but I’m not sure how it will impact the OpenCV detector script or its performance. Below is the adapted code for taking screenshots: import pyautogui import time import os def generate_image_dataset(region=None): if not os.path.exists("images"): os.mkdir("images")
count = 0 while True: img = pyautogui.screenshot(region=region) img.save(f"./images/img_{count}.png") count += 1 time.sleep(0.3) if __name__ == "__main__": region = None # Tuple specifying the left, top, width, and height of the region to capture can improve performance generate_image_dataset(region)
Got my sub, thanks for this video my friend. It was truly amazing and very helpful for a noob like me. If your goal was to help people learn, then you should be proud, because this genuinely helped me a lot! Thanks again
@@moisesdepaulodias7980 You're welcome. I get a warning message in the last cell when I attempt to train my model, it reads: "Warning: in txt-labels class_id=-1 >= classes=1 in cfg-file. In txt-labels class_id should be [from 0 to 0] Should I Ignore this? Eventually when it is done training i'll be able to see if it worked or not anyways.
Hey, thanks for your comment! I'm a little busy with my job right now, but I want to make more videos (mostly about other approaches without using machine learning, that use far less computer resources and in some cases they have the same result)
VAI BRASIL Moro no Reino Unido, seu ingles ta bem bom cara. Tem o sotaque, mas da pra entender perfeitamente voce. Parabens mesmo, primeiro pelo tutorial claro e segundo por ter peito e colocar o brabo em ingles. Bahhh piazao entrei no teu linkedin tu ainda e curitibano kkkkk
cara, muito obrigado mesmo pelo seu comentário!! fico muito feliz mesmo que consegui te ajudar man, abraço!!! e vou tentar fazer mais videos quando conseguir um tempo livre
Hi, I tried your tutorial, but for some reason, when I did the first step, I captured the image of a game in bluestacks. All images came in black, or just the first frame picture. I tried to test the image capture in other applications, even on a notepad, and got the same result. Try to change Windows 11 and 10. Try changing the resolution and nothing. im new on this help plis :) btw, good tutorial, I fellow through the whole process.
Hi there, I recently helped another person with the same problem, in his case the problem was the game he was trying to detect objects, but in your case you said you were using bluestacks, so I dont know what is the problem.. can you call me on discord for us to search together? my user is moises-dias
Do you have a Video on Transfere Learning too ? You explained that very well it was easy to understand but i now want to fine tune my weight and continue to train it for better results. Also if i only want to capture Buttons as an object are there other better learning methodes ? i saw the lableing website had "Image Detection" too would that be better for my usage ?
I managed to set up everything, however, when I run it on my game the window that opens to display the detections is a still image, I can see the bounding boxes around the objects I trianed my Model for. If I rerun it shows the same image. Note that I run into an error due to this line img = np.fromstring(signedIntsArray, dtype='uint8') The Notebook error message suggested to change it to 'np.frombuffer' so I changed it and is not giving error now, but not working the same way like in yours, The displaying window is still image cant not interact and go around in game like you in that Window.
Hi there! Hmm, I haven't encountered this problem, but could you call me on Discord so we can try to fix it? My username is moises_dias. I'll do my best to help you.
Hello, when I run the last step, no error message comes up but nothing happens; the image recognition does not work. Could you please help? I'm a newbie when it comes to coding but I'm very interested in it. Thank you in advance.
Didn't pass the first step , but liked and subbed. your guide seem promising for me. I got only black screen or sometime the first frame with jupyter window overlapse in it. hope I might make it pass the 1st step someday.
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well). I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator. I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Hi bro!! thanks for the video, I wanted to ask you, is there a problem if you take the screenshots manually and use png format?, or if something would have to be modified to use that format
hi there! thanks for the reply! i only tested taking images using win32gui and saving as jpeg, i dont know if it will work with png but its worth trying, I hope that it will work for you. worst case i would sugest you try to convert them to jpeg and using the converted images on the training step
I have a question and I would be more than overwhelming apprecieate if you would reply. Im trying to create an autobot for an android game so i would have to run that game in the stage which I want to autoplay but my pc is relatively weak. Anyway, my question is, can I record my gameplay using my mobile and then upload it on my pc using the same size video so my bot would take picture not directly from the game but rather the video that I have played before (all I need the bot to do was to follow almost exactly what I do, to avoid object and park the car at the right destination) Im sorry for bad narrative Im really looking foward to our answer, i think your video is very useful and good😊
TUTORIAL MT BRABO MEU MANO. Estou a algum tempo tentando fazer um bot pra um rpg pra treinar visao computacional, comecei identificando objetos com pyautogui, e mexi um pouco com opencv mas sem mts resultados nesse ultimo. precisava de um modelo que identificasse varios objetos na tela e creio que este será um bom ponto de partida. muito obrigado.
Opa, muito obrigado pelo seu comentário man, de verdade!! Como falei em algum comentário anteriormente, eu tentei achar um conteúdo assim como nesse vídeo, mostrando a criação de ponta a ponta de um sistema de detecção de objetos disponibilizando as coordenadas em python, mas não achava nada, daí qnd fiz o meu tentei fazer esse vídeo, mas não esperava uma recpção tão boa! Fico muito feliz que vc tenha gostado man!!!
Opa mano, no ultimo passo quando eu rodo fica spamando uma tela branca na célula do Jupyter, abre uma tela python chamado window e não detecta nada, gerei mais de 350 imagens para ter certeza e etiquetei com apenas uma label mais de 150, oque poderia ser ? Ja te mandei convite no Discord qualquer coisa te mando um print lá
Can I display a labelling box like an open cv screen inside the game screen or is there a way to send keyboard/mouse movement to the game inside the open cv screen
Hello! I dont know how to put the bounding box in the game screen. About the movement automation, that is possible to do! I created a new video where I show how you can automate actions based on the detections, you can see more details on the video: ruclips.net/video/gdIVHdRbhOs/видео.html
Hi, there are some false positives with my trained model. Maybe because I only used 80+ images. To make any amendments, do i have to train it all over again?
Thank you for the tutorial. I managed to follow it successfully! Would there be a way to modify it to be able to read and return words or sequences of numbers from what is being identified as well, or is that beyond the scope of YOLO?
Hi there! If you are interested in detecting words I suggest you look for OCR (Optical character recognition), maybe it will be better for your objective than object detection (sorry I dont know if I understand correctly your question)
in 17:48 after it's done I checked the training folder and it doesn't show anything else than placeholder.txt. Also when i pressed "!./darknet detector train data/obj.data cfg/yolov4-tiny-custom.cfg yolov4-tiny.conv.29 -dont_show" It ran for 2 seconds and stoppe. I also saw when running it has a different output from what I can see in the video, maybe because I have a small amount of data?
Hi there. Probably the folder doesn't have anything else because because the training command didn't work. Please, check if you changed your runtime to use a GPU (I did that at 15:28). Also, compare the outputs of all the commands to my execution in the video. Do you notice any differences in the output, or is it just the last one that's different?
@@moisesdepaulodias7980 I compared all the outputs of the earlier commands before the final one and all has exactly the same output in the video. I changed the runtime just like in the video. The last one only has the different output from the video. It doesn't show any of the v3 lines shown in the video. I can show the output in discord.
@@ygg278 Hmm.. I just ran it here and I am not getting any error. How many images are you using? Also, are you sure that you uploaded the images AND the text files with the coordinates? (you can check the command before the "!python proccess.py" if the output contains one .txt after every .jpg Please call me on discord, my user is moises_dias, I will try my best to help you
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well). I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator. I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Which programs do I need to perform the first steps? I tried to install everything the version of yolov4 normally needs and I’m still stuck at the commandline jupyter notebook stuff
I also got stuck on the same command line. I tried reinstalling jupyter notebook in a normal command prompt you can run "pip install notebook" and then check with "jupyter notebook" to make sure that it actually runs properly. Than close and reopen the cmd of the folder you were using in the first step. For me that fixed the problem. Hope this helps.
Hi, thank you for the amazing tutorial! I am having a problem when after running the box starts "# Run this cell to initiate detections using the trained model." I get the window opening, but it just shows the initial screenshot it has received and does not update, it then shows the same screenshot on subsequent runs.
Hello. Did you make any changes to the code in the fourth notebook other than the window name? And did you copy the weights file correctly after training in the third notebook? Also, is there any error message on the output of the cell "# Run this cell to initiate detections using the trained model." ? Please send me a message on Discord so we can investigate together. My discord is moises_dias.
wow that was an amazing video! thank you:D I am a relatively new dev, so I wanted to ask: how can you capture a browser window?, having my problems, it will find the window, but the jpgs are only a small white line, it wont capture the whole browser window.. def subbed, really good stuff:)!
@@moisesdepaulodias7980 Hi! thanks for your reply:D. I already solved it. I had my problems finding the right window_title I think, but then it did work somehow! Finished the whole project, it was amazing, functions perfectly!
Hi there! Right now I am working on a playlist of machine learning on Google Cloud, but in the future I will make a video with a newer version of yolo, thanks for the suggestion!!
Ive made a model using yolov11 but cannot import to unity? does baracuda not support v11 of yolo? Can you provide more details on what to do after training this model please??? I want to use this to detect objects and display the 3d models of the corresponding object
Hi there, for my goal (detecting the center of the monsters) using bounding boxes was enough. But for more complex applications (like detecting the head of a player in the game counter strike) I believe that an outline trace would be better
Hey i'm having an issue with the screenshots, win32 is taking pictures of a small part of my game's window (upper left) but doesn't seem to want the full window. Any solution for that? cause i'm trying to resolve that and i can't find any solution. Please and thanks a lot for your video
Hello! Some games have software to prevent the use of external programs that interfere with the game (anti-cheats). In the game Ragnarok Online, I couldn't use Pynput, so I had to connect an Arduino to control the mouse and keyboard. I haven't tested it in League of Legends, but in your case, I would suggest you look for another way to capture images that the game doesn't block (using OpenCV instead of win32gui, maybe).
@@moisesdepaulodias7980 can you make an example on a game like Waven on steam ? ta show us the game window gestion 😁 you try all my favorite game continue ! 🤟
@@moisesdepaulodias7980 Thank you for your reply. While doing some research, I found a workaround that involves using the following line for the blackscreen debug "windll.user32.PrintWindow(self.hwnd, cDC.GetSafeHdc(), 3)" instead of "cDC.BitBlt((0, 0), (self.w, self.h), dcObj, (self.cropped_x, self.cropped_y), win32con.SRCCOPY)" in your code.
I have an issue at the last step of the training model part, with the /darknet detector train command. No files are being produced for the training folder. Every time I run the command, it lasts a few seconds, then stops as if the job was finished. CUDA-version: 12020 (12020), cuDNN: 8.9.6, CUDNN_HALF=1, GPU count: 1 CUDNN_HALF=1 OpenCV version: 4.5.4 yolov4-tiny-custom 0 : compute_capability = 750, cudnn_half = 1, GPU: Tesla T4 net.optimized_memory = 0 mini_batch = 4, batch = 64, time_steps = 1, train = 1 layer filters size/strd(dil) input output 0 Create CUDA-stream - 0 Create cudnn-handle 0 conv 32 3 x 3/ 2 416 x 416 x 3 -> 208 x 208 x 32 0.075 BF 1 conv 64 3 x 3/ 2 208 x 208 x 32 -> 104 x 104 x 64 0.399 BF 2 conv 64 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 64 0.797 BF 3 route 2 1/2 -> 104 x 104 x 32 4 conv 32 3 x 3/ 1 104 x 104 x 32 -> 104 x 104 x 32 0.199 BF 5 conv 32 3 x 3/ 1 104 x 104 x 32 -> 104 x 104 x 32 0.199 BF 6 route 5 4 -> 104 x 104 x 64 7 conv 64 1 x 1/ 1 104 x 104 x 64 -> 104 x 104 x 64 0.089 BF 8 route 2 7 -> 104 x 104 x 128 9 max 2x 2/ 2 104 x 104 x 128 -> 52 x 52 x 128 0.001 BF 10 conv 128 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 128 0.797 BF 11 route 10 1/2 -> 52 x 52 x 64 12 conv 64 3 x 3/ 1 52 x 52 x 64 -> 52 x 52 x 64 0.199 BF 13 conv 64 3 x 3/ 1 52 x 52 x 64 -> 52 x 52 x 64 0.199 BF 14 route 13 12 -> 52 x 52 x 128 15 conv 128 1 x 1/ 1 52 x 52 x 128 -> 52 x 52 x 128 0.089 BF 16 route 10 15 -> 52 x 52 x 256 17 max 2x 2/ 2 52 x 52 x 256 -> 26 x 26 x 256 0.001 BF 18 conv 256 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 256 0.797 BF 19 route 18 1/2 -> 26 x 26 x 128 20 conv 128 3 x 3/ 1 26 x 26 x 128 -> 26 x 26 x 128 0.199 BF 21 conv 128 3 x 3/ 1 26 x 26 x 128 -> 26 x 26 x 128 0.199 BF 22 route 21 20 -> 26 x 26 x 256 23 conv 256 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 256 0.089 BF 24 route 18 23 -> 26 x 26 x 512 25 max 2x 2/ 2 26 x 26 x 512 -> 13 x 13 x 512 0.000 BF 26 conv 512 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x 512 0.797 BF 27 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF 28 conv 512 3 x 3/ 1 13 x 13 x 256 -> 13 x 13 x 512 0.399 BF 29 conv 18 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 18 0.003 BF 30 yolo [yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05 nms_kind: greedynms (1), beta = 0.600000 31 route 27 -> 13 x 13 x 256 32 conv 128 1 x 1/ 1 13 x 13 x 256 -> 13 x 13 x 128 0.011 BF 33 upsample 2x 13 x 13 x 128 -> 26 x 26 x 128 34 route 33 23 -> 26 x 26 x 384 35 conv 256 3 x 3/ 1 26 x 26 x 384 -> 26 x 26 x 256 1.196 BF 36 conv 18 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 18 0.006 BF 37 yolo [yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05 nms_kind: greedynms (1), beta = 0.600000 Total BFLOPS 6.787 avg_outputs = 299663 Allocate additional workspace_size = 50.43 MB Loading weights from yolov4-tiny.conv.29... seen 64, trained: 0 K-images (0 Kilo-batches_64) Done! Loaded 29 layers from weights-file saveweights: Using default '1000' savelast: Using default '100' Weights are saved after: 1000 iterations. Last weights (*_last.weight) are stored every 100 iterations. Learning Rate: 0.00261, Momentum: 0.9, Decay: 0.0005 Detection layer: 30 - type = 28 Detection layer: 37 - type = 28 Create 6 permanent cpu-threads
Would it be possible to follow this but in the end, instead of using the weights file in a Python script, to use them in Nodejs? For instance with tensorflow-nodejs?
Hi there. I had the opportunity to try to help one person with the same problem, and I believe that this is related to some anti-cheat of the game you are testing (I also suspect that games within Steam may generate black screens as well). I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator. Also, I am using Windows 10, Python 3.11.3, I didnt tested in Windows 11 and other python versions. I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Does it works with 3d games? Especially the once that runs with launcher. Also, if I want to do fully automatic system for gathering rocks, trees just like minecraft, how to do it? Thnx a lot
hi there, sure! it works in 3d games too, i tested it in counter strike 1.6 and it worked just fine. I have another video in my channel explaining how to automate actions, I used fruit ninja as an use case but you can adapt to any game.
Hi, I wanted to know if you would make an automatic farm program for cloud mode... I work all day and I don't have much time to play, I wanted something simple so that when I get home I can already do my things
opa, no colab aparece algum erro ao executar o comando !./darknet detector train ... ? e no final do segundo notebook (rotulando imagens), vc gerou a pasta yolov4-tiny e colocou na raiz do seu google drive?
The config is broken, only supports jpg files, also the number of classes is not the same as the number of elements in classes array. Changing it all to actually match the set fixed it for me
Quanto vc cobra para fazer um bot para matar Isillas no Ragnarok? Estou tentando aprender a programar, mas acho que não é possível para mim. Se entre em contato comigo, por favor.
Opa, cara, sendo franco, acho que em sites de programadores freelancers vc pode encontrar gente oferecendo esse serviço, eu até poderia vender um bot pra vc mas eu estou com tempo bem limitado, começei um trabalho novo recentemente que ta tomando 101% do meu tempo :(
@@moisesdepaulodias7980 Eu meio que consegui rodar em servidor que tem Gepard Shield 3.0. Porém, ele começa matando normal, mas depois de alguns teleportes ele clicka no monstro e não acontece nada. Eu acho que é por causa do shield. Se vc souber alguém que faça, algum programa bem simples. Por favor, me avisa.
Have you ever had problems when captruing screens? I tried to do this for an online game but kept on getting blackscreen screenshots. I've tried to use pyautpgui to get the screenshots which worked but on the last step I realized that I will need to get the game window a way or another so couldn't finish my attempt. Also, great work! Do BR pro mundo maninho
Hi I did not get to run the full training because it was taking too long so I just downloaded the last weights file like you suggested. However when I attempt to run the detection cell of the detection code all that's returned is a black screen. Do you have any idea what could be causing it?
Hi there, can you send me a message on linkedin with more information about the error? my linkedin profile is in the description, I will do my best to assist where I can.
He is probably running the game in full screen mode, where the winapi is not able to capture since the data is stored internally. If you switch to windowed mode, it probably will work.
It will create a window? When i click on the window, my char in game won't move If put the window on top of my game window, and move my char in game, i can't see the detection from the created window.
hi i like to ask when it create a separate window why it keep showing the wrong window instead of the given named window at the first step am guessing it doing the same when it try to take a screenshot at that time jupyter notebook didn't run it keep saying name not define i just skip this step and write on my own IDLE and just send the picture to the yolo folder and somehow i got to the last step where we run the code and finally here i the jupyter notebook finally work and it show that it was making a separate window to display the images and finally it back to step 1 where it just show the terminal or jupyter notebook and not show the given name window Sorry first time using python idk anything
Hello when i'm doing the command jupyter notebook . it said 'jupyter' is not recognized as an internal or external command, operable program or batch file. can it be like that because i'm on widows 11 i try to contact you on linkedin
Hello! If you've executed "pip install -r requirements.txt" without any errors, I imagine the issue might be that the Jupyter executable's path is not included in the system's PATH variable. You can copy this exact error text and search it on Google, and you'll find how to resolve this problem. If the issue persists, please let me know in the comments or send me a message.
@@moisesdepaulodias7980 i found the issue ! thanks for help i was have like two python the one i installed with web site and the one with the widows store soo i deleted both and just take the one on web site i was forgeting to make the path variable directly at the installation of python (case that you need to cross)
Hey! I'm having a problem when it comes to capturing a game thats hardware accelerated. I don't really have any experience with programming or coding and would love to know if you've got some kind of way to make it able to capture those kinds of programs. I knwo for sure it's because of the hardware acceleration since I tried capturing discord with and without it enabled and got a black screen while on and no problem while off.
Hello! I created another video where I show how to automate actions based on detections, one of the actions can be clicking on the screen to walk toward a detected item, you can see that in more detail in the video: ruclips.net/video/gdIVHdRbhOs/видео.html
Hello! In this video, I was clicking on the game window that was on another screen, but I only recorded the window generated by OpenCV. I'm sorry if I gave you that impression, but I didn't perform the action of clicking on the OpenCV window and passing the commands to the game window.
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well). I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator. I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
@sarsengo no after that their are 2 main times where you have to use the code to take pictures of your window. I found away around the first one but in order to track where you stuff is you have to use the window tracker again and it's not very possible to connect it to your folders and run it on a cmd. Or atleast I don't know how.
THIS IS THE BEST TUTORIAL ON IN-SCREEN OBJECT DETECTION. PERIOD.
Simplified and provides a base from which more things can be explored.
Thank you for your efforts. I subbed and liked it. 🍻😊😊
Hey, thank you so much for your comment! It really made my day!
@@moisesdepaulodias7980 you can help me pls
Agreed. This is legendary
As a software developer I thank you for how well this was made, it gave me a very good baseline to work with and was overall extremely well thought out, you earned my sub!
Thank you so much for your comment!!!
owwwwwww dude Here is the training that I have been looking for for a year and could not find, you are the only one, please do not give up on the training and I will be waiting for the continuation, I am starting now.
thxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Holy moly, it works.
Thank you so much my friend. I did everything you said, exactly as you did and it works for a 3D game.
I'm still stoked on how it works, but it's awesome anyway.
Thank you so much my friend!!!
Hi there, thank you for your comment!
A few months ago I was working on a bot for Ragnarok Online, but I was having a hard time finding online content showing how to create a object detector and make the detection results available in Python. So, when I created my one, I decided to try making a video about it (this video), I didn't expect to have such a good reception. I'm very happy that it worked and was useful for you!
@@moisesdepaulodias7980 that was what I wanted to do. I started with template matching from OpenCV, but it didn't worked quite good and I started looking through using OpenCV for object detection but couldn't find something so easy as what it is in this video.
The only issue that I encountered, is that the model is a bit delussional and makes detection of other objects, but I will train another model after I finish with implementing all the things for my bot.
Thank you very much.
Also, do you know any resources for learning OpenCV. I'm a programmer, but I haven't looked through a lot of resources, what do you recommend for starting up with OpenCV
I followed the tutorial step by step until the end, and I must say it was incredibly simple. You explained everything so clearly, basically you did all the job I only had to label the dataset. Thank you so much for the great work! This makes me want to dive deeper into the AI/Bots/Automation topics.
I was losing fate in image detection projects after more than two years of researching to get this video by RUclips recommendation thank you man you open new world for us
It worked for me, i used 350 images and Diablo 3 as example. I love you so much, you just helped me a lot with a project i had in mind!!! Keep the channel up!
hey man! I am very happy to know that the video was useful to you!! thanks for your comment!!!
Que surpresa agradável! Fiz uma pesquisa em inglês pra aprender algo e descobri um brasileiro ensinando 🇧🇷🇧🇷, orgulho irmão!
Tava pensando em usar a tecnologia de yodo pra fazer um aimbot pro cs2, será que da boa?
hahahaah valeu pelo comentário! tentando representar o br hahaah
@@joaoaugusto6325 dar até da, porem esbarra num problema de fps, sua placa de video tem que ser muito boa pra gravar a tela, rodar o modelo de ia, e o codigo para mecher o mouse, caso o fps da gravacao da tela seja ruim, o modelo da as coordenadas x e y atrasadas, dai o aimbot nao funciona bem, precisa de um hardware bem potente, ou usar os modelos de menor precisao do yolo, mas ai o aim fica pior.
This is so clear, i have search tutorial for object detection but didnt get the clear info or maybe im stupid so that i cant understand😅, but not for your tutorial, this is really clear for me, i can digest each of information/step, you really put big effort to make this tutorial man.
Thanks alot bro.
Subss.....🤜🤛
Hey man, thank you so much for your comment!!! I wasn't expecting such good feedback, but I am truly happy that my video is helping you out!!!
Cool tutorial. I wanted to ask, the images that is being captured on the generate dataset notebook only shows black pictures. I am using it on a browser game. Already tried using different browsers, but it still has the same output of only capturing black images. Is there a fix for this? Thank you :D
same issue
same issue, stardew valley, ark, delta force2, spotify... all of them gives black screen
Same 😢
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well).
I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator.
I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
I encountered the same issue. It turns out it’s not related to anti-cheat mechanisms, but rather an operating system security feature when you try capture a specific window. Even using "Calculator" as an example didn’t work. However, I managed to adapt the code to take screenshots using pyautogui instead of pywin32. This adjustment doesn’t affect the performance of the code significantly, but I’m not sure how it will impact the OpenCV detector script or its performance. Below is the adapted code for taking screenshots:
import pyautogui
import time
import os
def generate_image_dataset(region=None):
if not os.path.exists("images"):
os.mkdir("images")
count = 0
while True:
img = pyautogui.screenshot(region=region)
img.save(f"./images/img_{count}.png")
count += 1
time.sleep(0.3)
if __name__ == "__main__":
region = None # Tuple specifying the left, top, width, and height of the region to capture can improve performance
generate_image_dataset(region)
Got my sub, thanks for this video my friend. It was truly amazing and very helpful for a noob like me. If your goal was to help people learn, then you should be proud, because this genuinely helped me a lot! Thanks again
Thank you so much for your comment! It really means a lot to me!!!
@@moisesdepaulodias7980 You're welcome. I get a warning message in the last cell when I attempt to train my model, it reads: "Warning: in txt-labels class_id=-1 >= classes=1 in cfg-file. In txt-labels class_id should be [from 0 to 0] Should I Ignore this? Eventually when it is done training i'll be able to see if it worked or not anyways.
Great tutorial! You are awesome. Please do more projects like this :)
Hey, thanks for your comment! I'm a little busy with my job right now, but I want to make more videos (mostly about other approaches without using machine learning, that use far less computer resources and in some cases they have the same result)
VAI BRASIL
Moro no Reino Unido, seu ingles ta bem bom cara. Tem o sotaque, mas da pra entender perfeitamente voce. Parabens mesmo, primeiro pelo tutorial claro e segundo por ter peito e colocar o brabo em ingles.
Bahhh piazao entrei no teu linkedin tu ainda e curitibano kkkkk
Está faltando um desses em português Paulo! 🚀 🔥 Parabéns pelo vídeo.
seria ótimo
opa muito obrigado pelo comentário!! vou colocar legenda em portugues em breve nesse vídeo, abraço!!
amazing tutorial, keep bringing more for us
Thanks buddy, the only one video makes sense for dataset training
hey, thanks for your comment!
Moises, cara, eu estou tentando fazer isso faz tempo e não consigo. Você é espetacular, explicou de maneira didática! Faça mais vídeos!
cara, muito obrigado mesmo pelo seu comentário!! fico muito feliz mesmo que consegui te ajudar man, abraço!!! e vou tentar fazer mais videos quando conseguir um tempo livre
Amazing information, thank you.
Hey, thank you so much for your comment!!
i got results and im stoked!
Hey!! I am happy to know that it worked for you!!!
Cara, que tutorial perfeito! Parabéns irmão, espero que continue trazendo mais conteúdos do tipo!
Opa, muito obrigado pelo elogio mano!! De verdade mesmo!! Vou tentar trazer mais tutoriais como esse. Abraço!!
Hi, I tried your tutorial, but for some reason, when I did the first step, I captured the image of a game in bluestacks. All images came in black, or just the first frame picture. I tried to test the image capture in other applications, even on a notepad, and got the same result. Try to change Windows 11 and 10. Try changing the resolution and nothing. im new on this help plis :) btw, good tutorial, I fellow through the whole process.
Hi there, I recently helped another person with the same problem, in his case the problem was the game he was trying to detect objects, but in your case you said you were using bluestacks, so I dont know what is the problem.. can you call me on discord for us to search together? my user is moises-dias
@@moisesdepaulodias7980 ur discord name is not right
@@moisesdepaulodias7980 i have the same problem dude i am trying it for league of legends
@@moisesdepaulodias7980 I have the same issue, did you found the solution ?
I wonder how usable that is for the Valorant crowd.
I keep getting a "windowcapture not defined" when I run the data capture/image training app.
Subscribed, amazing content. Would love to see further development for this stuff
Hey, thanks for your comment man!!
You chose my favorite game! 🤩
Hi, I am tying to follow up the video, and I want ask if Macos computer could run these programs and how to download dependencies for Macbook
hey there! sorry but I didnt tested on mac so I cant tell for sure if it will work :(
Thank you for tutorial!
I wanted to know more about image quality and what types of images I should use if trying this on a 3D game
Ouro puro, irmão. Obrigado pelo conteúdo.
opa, muito obrigado mesmo pelo comentário mano, de verdade!! Fico muito feliz em saber que vc gostou do vídeo!!
Do you have a Video on Transfere Learning too ? You explained that very well it was easy to understand but i now want to fine tune my weight and continue to train it for better results.
Also if i only want to capture Buttons as an object are there other better learning methodes ? i saw the lableing website had "Image Detection" too would that be better for my usage ?
can you add gameplay videos for the bot to learn from? so you can just add a massive library instead of having to train it yourself?
I managed to set up everything, however, when I run it on my game the window that opens to display the detections is a still image, I can see the bounding boxes around the objects I trianed my Model for. If I rerun it shows the same image. Note that I run into an error due to this line img = np.fromstring(signedIntsArray, dtype='uint8') The Notebook error message suggested to change it to 'np.frombuffer' so I changed it and is not giving error now, but not working the same way like in yours, The displaying window is still image cant not interact and go around in game like you in that Window.
Hi there! Hmm, I haven't encountered this problem, but could you call me on Discord so we can try to fix it? My username is moises_dias. I'll do my best to help you.
@@moisesdepaulodias7980 thank you I will add you on Discord, and contact you.I have the same profile image on Discord
@@moisesdepaulodias7980 I sent youa friend request on Discord, I have the same profile picture like here. thank you in advance
Thank you! This is gold!
good for farming gold*
You are the best bro
Can you plsss make a tutorial on the same thing but all local? I really need one!!!
so how do you avoid being detected, the character will immediately be hit and use an automatic skill?
Hi there! Sorry, I didn't understand your question.
@@moisesdepaulodias7980 i mean, bot auto attack
How would you take your finished project and take the code in for your own visual studio code or pycharm for example?
Hi there, you can use the 'Jupyter' extension in VSCode to run notebooks. I used the Jupyter notebook web interface for simplicity.
Can you do another video explaining how to add new objects to your dataset so it will identify new creatures in your game?
Hello, when I run the last step, no error message comes up but nothing happens; the image recognition does not work. Could you please help? I'm a newbie when it comes to coding but I'm very interested in it. Thank you in advance.
Quick question? Any particular reason for not using a newer version of yolo?
Hi there! I used yolov4 because I have already used it before, but I believe newer versions would work just fine or even better.
Didn't pass the first step , but liked and subbed. your guide seem promising for me.
I got only black screen or sometime the first frame with jupyter window overlapse in it. hope I might make it pass the 1st step someday.
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well).
I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator.
I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Hi bro!! thanks for the video,
I wanted to ask you, is there a problem if you take the screenshots manually and use png format?, or if something would have to be modified to use that format
hi there! thanks for the reply!
i only tested taking images using win32gui and saving as jpeg, i dont know if it will work with png but its worth trying, I hope that it will work for you. worst case i would sugest you try to convert them to jpeg and using the converted images on the training step
I have a question and I would be more than overwhelming apprecieate if you would reply.
Im trying to create an autobot for an android game so i would have to run that game in the stage which I want to autoplay but my pc is relatively weak. Anyway, my question is, can I record my gameplay using my mobile and then upload it on my pc using the same size video so my bot would take picture not directly from the game but rather the video that I have played before (all I need the bot to do was to follow almost exactly what I do, to avoid object and park the car at the right destination) Im sorry for bad narrative Im really looking foward to our answer, i think your video is very useful and good😊
amazing tutorial
TUTORIAL MT BRABO MEU MANO. Estou a algum tempo tentando fazer um bot pra um rpg pra treinar visao computacional, comecei identificando objetos com pyautogui, e mexi um pouco com opencv mas sem mts resultados nesse ultimo. precisava de um modelo que identificasse varios objetos na tela e creio que este será um bom ponto de partida. muito obrigado.
Opa, muito obrigado pelo seu comentário man, de verdade!! Como falei em algum comentário anteriormente, eu tentei achar um conteúdo assim como nesse vídeo, mostrando a criação de ponta a ponta de um sistema de detecção de objetos disponibilizando as coordenadas em python, mas não achava nada, daí qnd fiz o meu tentei fazer esse vídeo, mas não esperava uma recpção tão boa! Fico muito feliz que vc tenha gostado man!!!
Opa mano, no ultimo passo quando eu rodo fica spamando uma tela branca na célula do Jupyter, abre uma tela python chamado window e não detecta nada, gerei mais de 350 imagens para ter certeza e etiquetei com apenas uma label mais de 150, oque poderia ser ? Ja te mandei convite no Discord qualquer coisa te mando um print lá
Can I display a labelling box like an open cv screen inside the game screen or is there a way to send keyboard/mouse movement to the game inside the open cv screen
Hello! I dont know how to put the bounding box in the game screen. About the movement automation, that is possible to do! I created a new video where I show how you can automate actions based on the detections, you can see more details on the video: ruclips.net/video/gdIVHdRbhOs/видео.html
Hi, there are some false positives with my trained model. Maybe because I only used 80+ images. To make any amendments, do i have to train it all over again?
Hi there, well, I think so, depending on the graphics you need far more than 80 images.
@@moisesdepaulodias7980 ok will give it a shot, thanks!
Thank you for the tutorial. I managed to follow it successfully!
Would there be a way to modify it to be able to read and return words or sequences of numbers from what is being identified as well, or is that beyond the scope of YOLO?
Hi there! If you are interested in detecting words I suggest you look for OCR (Optical character recognition), maybe it will be better for your objective than object detection (sorry I dont know if I understand correctly your question)
@@moisesdepaulodias7980 Thank you!
Please record a video demonstrating how to click on the identified monsters. Vlw
hey there! i suggest you watch this video, i believe that you can use the same logic on the video to do that watch?v=gdIVHdRbhOs
Hello sir, have a problem with “error: CreateCompatibleDC failed”. How i can fix it?
in 17:48 after it's done I checked the training folder and it doesn't show anything else than placeholder.txt. Also when i pressed "!./darknet detector train data/obj.data cfg/yolov4-tiny-custom.cfg yolov4-tiny.conv.29 -dont_show" It ran for 2 seconds and stoppe. I also saw when running it has a different output from what I can see in the video, maybe because I have a small amount of data?
Hi there. Probably the folder doesn't have anything else because because the training command didn't work. Please, check if you changed your runtime to use a GPU (I did that at 15:28). Also, compare the outputs of all the commands to my execution in the video. Do you notice any differences in the output, or is it just the last one that's different?
@@moisesdepaulodias7980 I compared all the outputs of the earlier commands before the final one and all has exactly the same output in the video. I changed the runtime just like in the video. The last one only has the different output from the video. It doesn't show any of the v3 lines shown in the video. I can show the output in discord.
@@ygg278 Hmm.. I just ran it here and I am not getting any error. How many images are you using? Also, are you sure that you uploaded the images AND the text files with the coordinates? (you can check the command before the "!python proccess.py" if the output contains one .txt after every .jpg
Please call me on discord, my user is moises_dias, I will try my best to help you
@@moisesdepaulodias7980 I used 771 png images. i uploaded both images and text files with the coordinates.
@@moisesdepaulodias7980 I don't know why I can't see my reply but I'll just say it again, I used 771 png images. I added you already, daleggy.
Moises monstro!
Really clear explaination, obrigado!
Hlo sir the images generated in the image folder are full black why .😢 Title bar pixels and border pixels values are correct.how can i fix it.
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well).
I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator.
I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Thanks for your reply I also tried BlueStacks but faced the same problem in my windows 11
Which programs do I need to perform the first steps? I tried to install everything the version of yolov4 normally needs and I’m still stuck at the commandline jupyter notebook stuff
I also got stuck on the same command line. I tried reinstalling jupyter notebook in a normal command prompt you can run "pip install notebook" and then check with "jupyter notebook" to make sure that it actually runs properly. Than close and reopen the cmd of the folder you were using in the first step. For me that fixed the problem. Hope this helps.
Could you make similar tutorial in C++? Maybe using DirectML library? In a lot of use cases python deployment for inference is just way too slow.
Hi there! Thank you for the suggestion! I will consider it for my next videos.
Hi, thank you for the amazing tutorial!
I am having a problem when after running the box starts "# Run this cell to initiate detections using the trained model."
I get the window opening, but it just shows the initial screenshot it has received and does not update, it then shows the same screenshot on subsequent runs.
Hello. Did you make any changes to the code in the fourth notebook other than the window name? And did you copy the weights file correctly after training in the third notebook? Also, is there any error message on the output of the cell "# Run this cell to initiate detections using the trained model." ?
Please send me a message on Discord so we can investigate together. My discord is moises_dias.
update: I just realized the same is happening for:
1_generate_dataset - Window Capture
Found the problem, for anyone with the same issue:
The problem was running the game through steam
wow that was an amazing video! thank you:D
I am a relatively new dev, so I wanted to ask: how can you capture a browser window?, having my problems, it will find the window, but the jpgs are only a small white line, it wont capture the whole browser window..
def subbed, really good stuff:)!
Hi there! Thanks for your comment!! Sorry but I didnt understand your question, you need to detect only part of the browser window?
@@moisesdepaulodias7980 Hi! thanks for your reply:D. I already solved it. I had my problems finding the right window_title I think, but then it did work somehow! Finished the whole project, it was amazing, functions perfectly!
@@Noelnnn Great!! I am happy to know that it worked!!!
can you make a video showing how to utilize yolov7 or newer?
Hi there! Right now I am working on a playlist of machine learning on Google Cloud, but in the future I will make a video with a newer version of yolo, thanks for the suggestion!!
Ive made a model using yolov11 but cannot import to unity?
does baracuda not support v11 of yolo?
Can you provide more details on what to do after training this model please???
I want to use this to detect objects and display the 3d models of the corresponding object
Thank you for great video! When downloading the zip file after annotating, the version of YOLO wouldn't matter? I'm planning to use YOLO10s
why not an outline trace in modern colors? boxes is an old addage.
Hi there, for my goal (detecting the center of the monsters) using bounding boxes was enough. But for more complex applications (like detecting the head of a player in the game counter strike) I believe that an outline trace would be better
@@moisesdepaulodias7980 makes sense buddy
A good reference would be the old Halo game ODDT. One of the best I’ve ever seen.
i love this tutorial
thank you for your tutorial! i wanna ask what GPU are you using?
Hi there! Thanks for your comment!
I am using the integrated GPU of my laptop, it's a Radeon 520 I believe.
Hey i'm having an issue with the screenshots, win32 is taking pictures of a small part of my game's window (upper left) but doesn't seem to want the full window. Any solution for that? cause i'm trying to resolve that and i can't find any solution. Please and thanks a lot for your video
ok sorry i kinda resolved my problem, it was due to my sceen scaling not at 100% but at 150% so going to 100% solved this issue
@@yokingdom9936 hey, sorry for the late reply but I am happy to know that you solved the problem!!
On training part the number 7 says no such file or directory
Hi there! Did you add the "yolov4-tiny" folder (created on the file 2_label_dataset.ipynb) to the root directory of your Google Drive?
@@moisesdepaulodias7980 i put yolo 3 in colab then yolo4 in google drive
and says no such file, i tried a lot is the same
Capture with win32gui doesn't work on all games such as League of Legends, any ideas to fix the problem?
Hello! Some games have software to prevent the use of external programs that interfere with the game (anti-cheats). In the game Ragnarok Online, I couldn't use Pynput, so I had to connect an Arduino to control the mouse and keyboard. I haven't tested it in League of Legends, but in your case, I would suggest you look for another way to capture images that the game doesn't block (using OpenCV instead of win32gui, maybe).
@@moisesdepaulodias7980 can you make an example on a game like Waven on steam ? ta show us the game window gestion 😁
you try all my favorite game continue ! 🤟
@@moisesdepaulodias7980 Thank you for your reply. While doing some research, I found a workaround that involves using the following line for the blackscreen debug "windll.user32.PrintWindow(self.hwnd, cDC.GetSafeHdc(), 3)" instead of "cDC.BitBlt((0, 0), (self.w, self.h), dcObj, (self.cropped_x, self.cropped_y), win32con.SRCCOPY)" in your code.
Use pygetwindow instead of win32gui
I have an issue at the last step of the training model part, with the /darknet detector train command. No files are being produced for the training folder.
Every time I run the command, it lasts a few seconds, then stops as if the job was finished.
CUDA-version: 12020 (12020), cuDNN: 8.9.6, CUDNN_HALF=1, GPU count: 1
CUDNN_HALF=1
OpenCV version: 4.5.4
yolov4-tiny-custom
0 : compute_capability = 750, cudnn_half = 1, GPU: Tesla T4
net.optimized_memory = 0
mini_batch = 4, batch = 64, time_steps = 1, train = 1
layer filters size/strd(dil) input output
0 Create CUDA-stream - 0
Create cudnn-handle 0
conv 32 3 x 3/ 2 416 x 416 x 3 -> 208 x 208 x 32 0.075 BF
1 conv 64 3 x 3/ 2 208 x 208 x 32 -> 104 x 104 x 64 0.399 BF
2 conv 64 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 64 0.797 BF
3 route 2 1/2 -> 104 x 104 x 32
4 conv 32 3 x 3/ 1 104 x 104 x 32 -> 104 x 104 x 32 0.199 BF
5 conv 32 3 x 3/ 1 104 x 104 x 32 -> 104 x 104 x 32 0.199 BF
6 route 5 4 -> 104 x 104 x 64
7 conv 64 1 x 1/ 1 104 x 104 x 64 -> 104 x 104 x 64 0.089 BF
8 route 2 7 -> 104 x 104 x 128
9 max 2x 2/ 2 104 x 104 x 128 -> 52 x 52 x 128 0.001 BF
10 conv 128 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 128 0.797 BF
11 route 10 1/2 -> 52 x 52 x 64
12 conv 64 3 x 3/ 1 52 x 52 x 64 -> 52 x 52 x 64 0.199 BF
13 conv 64 3 x 3/ 1 52 x 52 x 64 -> 52 x 52 x 64 0.199 BF
14 route 13 12 -> 52 x 52 x 128
15 conv 128 1 x 1/ 1 52 x 52 x 128 -> 52 x 52 x 128 0.089 BF
16 route 10 15 -> 52 x 52 x 256
17 max 2x 2/ 2 52 x 52 x 256 -> 26 x 26 x 256 0.001 BF
18 conv 256 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 256 0.797 BF
19 route 18 1/2 -> 26 x 26 x 128
20 conv 128 3 x 3/ 1 26 x 26 x 128 -> 26 x 26 x 128 0.199 BF
21 conv 128 3 x 3/ 1 26 x 26 x 128 -> 26 x 26 x 128 0.199 BF
22 route 21 20 -> 26 x 26 x 256
23 conv 256 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 256 0.089 BF
24 route 18 23 -> 26 x 26 x 512
25 max 2x 2/ 2 26 x 26 x 512 -> 13 x 13 x 512 0.000 BF
26 conv 512 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x 512 0.797 BF
27 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF
28 conv 512 3 x 3/ 1 13 x 13 x 256 -> 13 x 13 x 512 0.399 BF
29 conv 18 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 18 0.003 BF
30 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
nms_kind: greedynms (1), beta = 0.600000
31 route 27 -> 13 x 13 x 256
32 conv 128 1 x 1/ 1 13 x 13 x 256 -> 13 x 13 x 128 0.011 BF
33 upsample 2x 13 x 13 x 128 -> 26 x 26 x 128
34 route 33 23 -> 26 x 26 x 384
35 conv 256 3 x 3/ 1 26 x 26 x 384 -> 26 x 26 x 256 1.196 BF
36 conv 18 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 18 0.006 BF
37 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
nms_kind: greedynms (1), beta = 0.600000
Total BFLOPS 6.787
avg_outputs = 299663
Allocate additional workspace_size = 50.43 MB
Loading weights from yolov4-tiny.conv.29...
seen 64, trained: 0 K-images (0 Kilo-batches_64)
Done! Loaded 29 layers from weights-file
saveweights: Using default '1000'
savelast: Using default '100'
Weights are saved after: 1000 iterations. Last weights (*_last.weight) are stored every 100 iterations.
Learning Rate: 0.00261, Momentum: 0.9, Decay: 0.0005
Detection layer: 30 - type = 28
Detection layer: 37 - type = 28
Create 6 permanent cpu-threads
did you find out how to fix this issue?
nvm i found it out
Check the config files, they seem to be hardcoded
@@duckyyaboi3129 how ?
please help i keep getting coomand error in 'pip' is not recognised as an internal or external. we=hen trying to install the libraries
My new pc did the same thing
Download Python i used 3.10.5 make sure you click add to path during the installation
Would it be possible to follow this but in the end, instead of using the weights file in a Python script, to use them in Nodejs? For instance with tensorflow-nodejs?
Es genial lo que haces, te deseo mucho éxito
¡Muchas gracias por el comentario!
The screenshots in the Images folder are black all of them, idk why this happening, anyone knows ?
+
Hi there. I had the opportunity to try to help one person with the same problem, and I believe that this is related to some anti-cheat of the game you are testing (I also suspect that games within Steam may generate black screens as well).
I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator.
Also, I am using Windows 10, Python 3.11.3, I didnt tested in Windows 11 and other python versions.
I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
Does it works with 3d games? Especially the once that runs with launcher. Also, if I want to do fully automatic system for gathering rocks, trees just like minecraft, how to do it? Thnx a lot
hi there, sure! it works in 3d games too, i tested it in counter strike 1.6 and it worked just fine. I have another video in my channel explaining how to automate actions, I used fruit ninja as an use case but you can adapt to any game.
@@moisesdepaulodias7980 great! How to apply inputs to gathering and farming?
Hi, I wanted to know if you would make an automatic farm program for cloud mode... I work all day and I don't have much time to play, I wanted something simple so that when I get home I can already do my things
Salve Moises! No meu colab roda tudo menos a parte final. A pasta training fica vazia =/
opa, no colab aparece algum erro ao executar o comando !./darknet detector train ... ?
e no final do segundo notebook (rotulando imagens), vc gerou a pasta yolov4-tiny e colocou na raiz do seu google drive?
The config is broken, only supports jpg files, also the number of classes is not the same as the number of elements in classes array. Changing it all to actually match the set fixed it for me
Quanto vc cobra para fazer um bot para matar Isillas no Ragnarok? Estou tentando aprender a programar, mas acho que não é possível para mim. Se entre em contato comigo, por favor.
Opa, cara, sendo franco, acho que em sites de programadores freelancers vc pode encontrar gente oferecendo esse serviço, eu até poderia vender um bot pra vc mas eu estou com tempo bem limitado, começei um trabalho novo recentemente que ta tomando 101% do meu tempo :(
@@moisesdepaulodias7980 Eu meio que consegui rodar em servidor que tem Gepard Shield 3.0. Porém, ele começa matando normal, mas depois de alguns teleportes ele clicka no monstro e não acontece nada. Eu acho que é por causa do shield. Se vc souber alguém que faça, algum programa bem simples. Por favor, me avisa.
Have you ever had problems when captruing screens? I tried to do this for an online game but kept on getting blackscreen screenshots. I've tried to use pyautpgui to get the screenshots which worked but on the last step I realized that I will need to get the game window a way or another so couldn't finish my attempt. Also, great work!
Do BR pro mundo maninho
Parça do céu, que video maravilhoso, mto bom msm, parabéns
hello when i try i get error: CreateCompatibleDC failed at the very first step, the one that screenshot your computer screen
can you help me boss
hi there, can you send me a screenshot of the error in discord? my user is moises-dias, I will try to help you there
Hi I did not get to run the full training because it was taking too long so I just downloaded the last weights file like you suggested. However when I attempt to run the detection cell of the detection code all that's returned is a black screen. Do you have any idea what could be causing it?
Hi there, can you send me a message on linkedin with more information about the error? my linkedin profile is in the description, I will do my best to assist where I can.
He is probably running the game in full screen mode, where the winapi is not able to capture since the data is stored internally. If you switch to windowed mode, it probably will work.
It will create a window?
When i click on the window, my char in game won't move
If put the window on top of my game window, and move my char in game, i can't see the detection from the created window.
hi i like to ask when it create a separate window why it keep showing the wrong window instead of the given named window at the first step am guessing it doing the same when it try to take a screenshot at that time jupyter notebook didn't run it keep saying name not define i just skip this step and write on my own IDLE and just send the picture to the yolo folder and somehow i got to the last step where we run the code and finally here i the jupyter notebook finally work and it show that it was making a separate window to display the images and finally it back to step 1 where it just show the terminal or jupyter notebook and not show the given name window
Sorry first time using python idk anything
at the end the window of results dosent have any update of the screen bluestacks is only a stactic picture help
Why use an old version of yolo instead of v8 or so?
Hi there, I only used YOLOv4 because I had experience with it in college 😅
woow super nice, now how I can use it to farm or kill the mobss? xd
its answesome man, thank you for explaining it makes so much sense now. Can you pelase make one for the new yolo release?
Moises, como eu faço pra gerar clicks na tela do ragnarok? Aqui o pyautogui não funciona.
jupyter note books doesn't work for me, idea why ?
Hello when i'm doing the command jupyter notebook .
it said 'jupyter' is not recognized as an internal or external command,
operable program or batch file.
can it be like that because i'm on widows 11 i try to contact you on linkedin
Hello!
If you've executed "pip install -r requirements.txt" without any errors, I imagine the issue might be that the Jupyter executable's path is not included in the system's PATH variable. You can copy this exact error text and search it on Google, and you'll find how to resolve this problem. If the issue persists, please let me know in the comments or send me a message.
@@moisesdepaulodias7980 i found the issue ! thanks for help i was have like two python the one i installed with web site and the one with the widows store soo i deleted both and just take the one on web site i was forgeting to make the path variable directly at the installation of python (case that you need to cross)
Hey! I'm having a problem when it comes to capturing a game thats hardware accelerated. I don't really have any experience with programming or coding and would love to know if you've got some kind of way to make it able to capture those kinds of programs. I knwo for sure it's because of the hardware acceleration since I tried capturing discord with and without it enabled and got a black screen while on and no problem while off.
skill issue
How to make the bot automatically walk towards that item?
Hello! I created another video where I show how to automate actions based on detections, one of the actions can be clicking on the screen to walk toward a detected item, you can see that in more detail in the video: ruclips.net/video/gdIVHdRbhOs/видео.html
I am having an issue when generating the images it is just giving me black images (using D2:Resurrected) I tried in windowed and full screen
When u say run it does that mean just click enter on the script
Nice bro perfect
thanks!
How did you manage to pass key and mouse messages to the underlying window when clicking on the top-level window generated by OpenCV?
Hello! In this video, I was clicking on the game window that was on another screen, but I only recorded the window generated by OpenCV. I'm sorry if I gave you that impression, but I didn't perform the action of clicking on the OpenCV window and passing the commands to the game window.
@@moisesdepaulodias7980 So, how do I implement this, can you give me some instructions? Thanks.
the first code only gets black screenshots any ideas?
Hi there. I had the opportunity to try to help one person with the same problem in a Discord call, and I believe that this is related to some anti-cheat of your game. Because in this Discord call, the code worked in some games, but in others it generated black screens (I also suspect that games within Steam may generate black screens as well).
I suggest you try with other games to see if that is your case. For me, it worked with the games Terraria, Ragnarok Online, Diablo 2, and Fruit Ninja using the BlueStacks emulator.
I am trully sorry I can't help any further, but I didn't encounter this problem while creating the tutorial.
How can I capture window screen from a fullscreen game using DirectX graphics? Now I only see a black screen
Why do we need to use Jupyter notebook. Im going to look for a way around it. I really rather not use it
goodluck homeboy
i found a way around the first part but the last part you need it fr sure
You mean google colab part?
@sarsengo no after that their are 2 main times where you have to use the code to take pictures of your window. I found away around the first one but in order to track where you stuff is you have to use the window tracker again and it's not very possible to connect it to your folders and run it on a cmd. Or atleast I don't know how.
How do you deal with google colab instace disconnection? Training can be resumed?