Consequently, this has been the resulting main architecture. Of course, if I later desire to make the inference time of a single image prediction faster, I could always resort to using a network with fewer layers like VGG16 , though. Adrian: You clearly did your homework here and knew that siamese networks were the best architecture choice for this project.
Or did you use triplets and triplet loss to train your network? Anthony: Originally, I tried vanilla siamese networks that mainly used a pair of images to make comparisons, though its limitations started to show. As a result, I researched other architectures, and I eventually discovered the triplet net. It mainly differs from siamese networks as it uses three images instead of two and uses a different loss function known as triplet loss.
It was mainly able to manipulate distances between images using positive and negative anchors during the training process. Consequently, it was relatively quick to implement and just happen to be the resulting solution. Adrian: At this point, you have a deep learning model that can either identify an input Yugioh card or be very close to returning the correct Yugioh card in the top results.
How did you improve accuracy further? Did you employ some sort of image re-ranking algorithm? ORB is an algorithm that searches for feature points within an image, so if two images are completely identical, the two images should have the same amount of feature points as each other.
This algorithm serves as a support to our one-shot learning method. As soon as our neural network generates a score on all 10, cards and ranks them, our ORB takes the top- N card ranking e. The original similarity score and number of ORB points are then fed into a formula to obtain a final weighted similarity score. The weighted score of the top- N cards is compared, and the scores are rearranged to their final rankings. Figure 3 shows a previously challenging edge case in which we compare two images of the top card Dark Magician in different contrast settings.
Originally failed without ORB matching support, but considering the number of feature points in mind, we can get a more accurate ranking. After some experimentation and tuning of certain values, I improved the number of correct predictions significantly. How did you overcome this problem? Anthony: It was indeed interesting and tricky to deal with this problem.
Modern CNNs are in nature not shift-invariant, and that even small translations can confuse it. This is further emphasized by the fact we are dealing with very little data and that the algorithm was reliant on comparing feature maps together to make predictions.
This problem shows that our model would be very sensitive to slight misalignment and prevent our model from achieving its full potential. My first approach was to simply augment the data by adding more translations in the data augmentation process. However, this was not enough, and I had to look into other methods.
As a result, I found some research that created the blur pooling algorithm for tackling a similar problem. Blur pooling is a method made to solve the problem of CNNs not being sift-invariant and applied at the end of every convolution layer.
Adrian: Your algorithm works by essentially generating a similarity score for all cards in your dataset. Anthony: So, at this point, I have a model capable of generating similarity scores of every card at a reasonable accuracy. Now all I have to do is generate similarity scores for our input image and all the cards I wish to compare.
This does not sound bad on the surface, but remember that we have to do this on all cards we have in the dataset.
The problem is that there are over 10, cards we will have to compare with the input and generate its score. So if we take the number of seconds it takes to generate a similarity score and the total amount of cards 10, there are in the dataset, we get this:.
To predict what a single input image is, we would have to wait well over 30 minutes. This does not make our model practical to use as a result. To solve this, I ended up pre-calculating the output convolutional feature maps of all 10, cards ahead of time and storing them in a dictionary. The great thing about dictionaries is that retrieving the pre-calculated feature maps from them would be constant time O 1 time. So this would do a decent job scaling with the number of cards in the dataset.
So what happens is that after training, we iterate through over 10, cards, feed them into our triplet net to get the output convolution feature map, and store that in our dictionary. We just iterate through our new dictionary in the prediction phase instead of having our model performing forward propagation 10, times. As a result, the previous single-image prediction time of 36 minutes has been significantly reduced by close to 5 seconds.
This results in a more manageable model. Adrian: How did you test and evaluate the accuracy of your Yugioh card recognition system? I used a dataset for training, where official card art images were used from the ygoprodeck dataset A along with real-life photos of cards in the wild dataset B , which were pictures of cards taken by a camera.
Dataset B is essentially the ultimate testing dataset I used to succeed in the long run. This is an example of dataset B. His "Lava Golem" can be summoned to the opponent's side of the field where it slowly puts the stranglehold on his foe. He is merciless and will stop at nothing to achieve his goal. Bandit Keith Intercontinental champion Bandit Keith has no qualms about using underhanded tactics to steal the win.
His signature monster "Barrel Dragon" has an effect that enables it to destroy his opponent's card. She is determined to rescue her younger brother Marik from the darkness that has overtaken him. The power of her Millennium Necklace allows her to see the future. Odion Odion is the servant of the Ishtar family and has sworn his allegiance to Marik. An honest Duelist who Duels fair and square, his Deck is comprised of Trap Monsters, such as "Embodiment of Apophis," to ensnare his unsuspecting opponents.
Maximillion Pegasus Maximillion Pegasus is the president of Industrial Illusions and the genius game designer who created Duel Monsters.
He uses the power of his Millennium Eye to read his opponents' minds and see the cards in their hand. His Deck focuses on Toon Monsters to toy with his opponents.
But when he gets serious, his card "Relinquished" has an effect that enables it to absorb his opponents' monsters. Mokuba Kaiba Seto Kaiba's younger brother may only be in elementary school, but he's smart enough to be the Vice President of KaibaCorp. A skilled gamer in his own right, Mokuba is a Capsule Monsters champion. Whether those skills translate to being a Duelist is yet to be seen. Using their expert tag skills, they did their best to bludgeon Joey and Yugi in Duelist Kingdom's underground dungeon.
They can combine their three elemental gods "Sanga of the Thunder," "Kazejin," and "Suijin" to form their ace monster "Gate Guardian. He has no qualms about harming his own cards—as long as it guarantees him a victory.
Many of them require you to channel demonic spirits to win. You must log in or sign up to reply here. Share This Page Tweet. Your name or email address: Password: Forgot your password? This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register. By continuing to use this site, you are consenting to our use of cookies.
0コメント