

Running the TensorFlow object detection model averaged about 75 ms per image with my Nvidia 840M GPU, and about 200ms using just my i7 CPU. I then tweaked the official example from TensorFlow to run the model. To use the model in Java, I first needed to export one of the checkpoints using the instructions from the tutorial.
OSRS COLORBOT CODE
The code for object detection in Java using the same model was a little different from the code in Python. This script exported my model so that it could be loaded and then it drew boxes around the detected objects. I periodically used the draw_boxes.ipynb Jupyter notebook script from the TensorFlow object detector tutorial to visually validate my trained model. I trained my model for a total of 50,000 steps. I collected 200 images, with each image having 1–4 ores. I ran this script while mining iron ore, making sure to rotate the camera and move around so that I captured iron ore from a variety of angles and distances.

To collect images, I wrote a script that automatically takes a screenshot every 200 milliseconds. I followed this tutorial to train my custom TensorFlow object detector. You can read more about them on Wikipedia. A convolutional neural network is a type of neural network that is especially good for computer vision. I used TensorFlow to train a convolutional neural network to recognize these objects. Since everything in Runescape is very consistent in appearance, objects should be detectable with high precision. Surprisingly, I did not use OpenCV for object detection, since this was be done via a TensorFlow model. OpenCV is the open-source standard for computer vision. I tried to train a Haar cascade classifier but the training did not provide the results I wanted. I looked into a variety of OpenCV’s object detection algorithms such as SIFT, SURF, and Haar. Prior to using TensorFlow, I tried to go with a more traditional feature-detection algorithm for object detection. I used it to train a convolutional neural network for object detection. TensorFlow is a machine learning library developed by Google. It might also have lacked the necessary speed.
OSRS COLORBOT HOW TO
The other alternative was Python, which would have made OpenCV and TensorFlow usage easier, but I haven’t explored how to capture the screen and manipulate the mouse. Furthermore, the class provided an extremely convenient and fast way to capture the screen (<2 ms) as well as manipulate the mouse.Ĭ++ would have been a reasonable alternative, but capturing the screen and manipulating the mouse was more of a hassle. TensorFlow and OpenCV, the two libraries I used, both have Java wrappers. Overviewīefore diving into specific details, I want to provide an overview of the languages and libraries I was working with. As a spoiler, I’ll note that I eventually got banned at 87 mining. I later added a variety of features to further enhance the bot. These were my requirements only for a minimum viable product. Avoid other players: If there are other players competing for the same mining spot, hop worlds to avoid suspicion.Even though random events are now optional, ignoring them is a huge red flag. Random events: Random events should be dismissed.Human mouse movements: The mouse should follow organic, human-like paths.
OSRS COLORBOT MANUAL
