I solved the classification problem by image recognition in the training of the company, so I tried to do the same with my favorite idol. Below, the previous article
I tried to classify Oba Hana and Emiri Otani by deep learning
This time, based on the previous results, I would like to see what kind of image was mistaken for accuracy improvement.
Before that, we will introduce the two people to be classified.
I'm a ghostly heart. I am a member of the idol group "= LOVE". ** Dogawae yeah yeah yeah yeah yeah hey hey hey hey hey! !! !! !! !! -! !! !! ** **
Below is a Twitter account. Please follow us. Oba Hana (https://twitter.com/hana_oba)
He is also a member of the idol group "= LOVE". cute.
Emiri Otani (https://twitter.com/otani_emiri)
The accuracy of the last time was about 90% correct answer rate.
The last time was about 200 epochs.
Looking at this, it seems that it will still rise (if the number of trials is too large, the graph will fall constantly rather than temporarily)
So I will increase the number of times. From 200 to 1000 times
The accuracy has improved safely. It has been low for a long time around 800 times, is this overfitting? I thought, but it picked up at the end.
The correct answer rate for the 1000th epoch was 98.33%. Well, in reality, I did some trial and error to improve the accuracy at the time of training, so I was able to get quite accurate just by increasing the number of times. As an article, I should struggle to improve the accuracy, but I want to make it better. For the time being, today we will improve the accuracy so far and see what this model made a mistake. (I want to make inferences quickly)
I will answer below and see which one I made a mistake.
idol.ipynb
ans = []
for i in range(0,x_test.shape[0]):
x = np.array([x_test[i]])
y = model.predict(x)
ans.append(np.argmax(y))
if(ans[i] != t_test[i]):
print(i)
Below are the results
75
82
148
Of the 140 verification data, 3 incorrect answers = the correct answer rate is about 98%, isn't it? Use this to restore the data once dropped to a numerical value as shown below.
idol.ipynb
plt.imshow(x_test[75])
plt.imshow(x_test[82])
plt.imshow(x_test[148])
Since it was an image of Mr. Kameko, I will not post it. This is the first tweet below. (Like! Please press) https://twitter.com/hana_oba/status/1119100534286217221?s=20
Hmmm, it's usually Hanana-chan. The first piece has a rate of 89% The second piece has a 58% rate The third piece has a rate of 64% It seems that he finally made the decision to see it.
Well, it's hard to explain why deep learning made such a decision at a level that humans can understand, so there is nothing more to guess.
Next time, I will try to improve the accuracy in a different way.
Recommended Posts