top of page

Gathering Diablo 2 Resurrected Gem Data Yolo v5 Automated Box File Generation and Factories (part 3)

  • Jason Ismail
  • Apr 7, 2022
  • 3 min read

I have reached the next major milestone for my Diablo Gem sorter project. The image below shows my latest results. Try and look past the overlapping text. There is currently 38 possible classes in my project all classes were built using my trained tesseract OCR. The box file that was built for this image was created with no human interaction.


You can see the process leading up to these results in the following posts part 1 and part 2.


Last time I had built logic to determine the size of objects in inventory. Notice that the Yolo training data is properly accounting for items that take up more than one square in inventory including the two books and Horadric Cube below.


My current class list that was generated passing cleaned images into my trained Tesseract OCR is as follows. Using some looping logic I defined the order of the gems. I also had to convert all Jewel names to have them fall into a single class for training.


0_CHIPPED_AMETHYST
1_FLAWED_AMETHYST
2_AMETHYST
3_FLAWLESS_AMETHYST
4_PERFECT_AMETHYST
5_CHIPPED_DIAMOND
6_FLAWED_DIAMOND
7_DIAMOND
8_FLAWLESS_DIAMOND
9_PERFECT_DIAMOND
10_CHIPPED_EMERALD
11_FLAWED_EMERALD
12_EMERALD
13_FLAWLESS_EMERALD
14_PERFECT_EMERALD
15_CHIPPED_RUBY
16_FLAWED_RUBY
17_RUBY
18_FLAWLESS_RUBY
19_PERFECT_RUBY
20_CHIPPED_SAPPHIRE
21_FLAWED_SAPPHIRE
22_SAPPHIRE
23_FLAWLESS_SAPPHIRE
24_PERFECT_SAPPHIRE
25_CHIPPED_SKULL
26_FLAWED_SKULL
27_SKULL
28_FLAWLESS_SKULL
29_PERFECT_SKULL
30_CHIPPED_TOPAZ
31_FLAWED_TOPAZ
32_TOPAZ
33_FLAWLESS_TOPAZ
34_PERFECT_TOPAZ
35_JEWEL
36_HORADRIC_CUBE
37_TOME_OF_IDENTIFY
38_TOME_OF_TOWN_PORTAL

I have also included other color Jewels for this part of my project that the yolo network will be trained on. This is important since the jewels look similar to perfect gems.

The object oriented structure of my program is really paying off. Making the leap to building the Yolo text files was incredibly fast since I had already defined the Rectangle class and only needed to normalize the data based on screen size.

The program automatically generates box file data based on the objects that are currently visible on the screen. The data is represented by the class name index then normalized values for the x and y values for the center of the box as well as width and height.


Here is an example box file that was created. There are 95 entries in this box file. At any given time there could be up to 140 items on the screen.



The next step for the process is to build a new set of virtual containers using the container factory I built. That factory will build containers in memory without items attached.


I have access to this new set of containers in three lines of code which could be combined into a single function if needed.

Notice these new containers have all of the groundwork already laid out for them. But do not have items attached.


I can then randomize placing items into the new set of containers. The old container which I call source containers will be the current "real world" reality and the new destination container will be the goal. I will then move the items in the container in the real world to match the virtual container. Once the items are in their place we can build a new set of Yolo training data which will include the screenshot as well as the box file. This way I can create as much training data as needed without having to do any labeling for my project. Imagine labeling an image that could have 140 items on the screen while keeping track of 39 classes.


The ultimate goal of course once the Yolo network is trained will be to use my trained network to take one image of the screen and quickly locate all gems. This will eventually lead me to sorting gems as well as using reinforcement learning for combining gems in the Horadric Cube.


 
 
 

Comentários


DON'T MISS THE FUN.

Thanks for submitting!

Looking to Hire?

Connect with a Versatile Data Scientist

 

 


Are you in need of tailored data science solutions for your business? I'm here to help. With a Master's Degree in Data Science and a Bachelor's in Mathematics, I bring a blend of academic rigor and practical experience to the table.

Expertise in Building Comprehensive Data Solutions:

Proficient in developing end-to-end data science projects, including the collection, cleaning, and analysis of raw data.
Specialized in Python.


Technical Proficiencies:

Skilled in using Pandas, Yolo, NumPy, PyTorch and Keras/TensorFlow for creating sophisticated Deep Neural Networks.
Experienced in computer vision and leveraging Nvidia CUDA for high-performance computing tasks.


Personal Qualities:

Recognized by peers, mentors, and students as a dedicated and hardworking professional. I come with a long list of references.


Known for facing challenges head-on and being a supportive team player.
Skilled at making complex concepts accessible and relatable, with a passion for continuous learning.


Contact Information:

Jason Ismail
Masters in Data Science, Bachelors in Mathematics
LinkedIn Profile
Phone (Text Only): 719-322-8479

About Me

Data Science

Data Science isn't just my career; it's the realization of a lifelong passion where my love for mathematics, programming, and technology converge. Over the past 20 years, I've nurtured a deep fondness for computers, starting from building them to exploring their immense capabilities.

My academic path initially led me to programming and then chemistry, where I excelled nationally in the 98th percentile. This experience, however, led to an epiphany - it was the mathematical elements within chemistry that truly captivated me. This revelation steered me towards a scholarship in Mathematics and a subsequent career in teaching.

But the true calling came with Data Science. Here, I found an exhilarating opportunity to transform abstract mathematical theories into impactful, real-world applications. My focus now is on cutting-edge areas such as Artificial Intelligence, Neural Networks, Computer Vision, and Reinforcement Learning - fields where I can blend my analytical skills with creative problem-solving to innovate and advance the boundaries of technology.

Data Science for me is more than a profession; it's a canvas where I paint with numbers and algorithms, creating solutions that matter.

POST ARCHIVE

bottom of page