MarxSoul55 / cats_vs_dogs

Computer-vision meets... cats and dogs!
Apache License 2.0
6 stars 2 forks source link

Logo Design #1

Closed nunojesus closed 6 years ago

nunojesus commented 6 years ago

Hello, I would like to design a logo for your project. Do you have something on your mind for your logo? I can give some ideas if you are interested? Can you tell me more about your project? Greetings Nuno

MarxSoul55 commented 6 years ago

Hello Nuno!

Hello, I would like to design a logo for your project. Do you have something on your mind for your logo? I can give some ideas if you are interested?

A logo sounds like a great idea! However, I don't have anything in mind for it; I will say that I'm fond of material design. If you could design a logo in that theme, that would be amazing!

Can you tell me more about your project?

What would you like to know?

nunojesus commented 6 years ago

I think I can do that. How the software works?

nunojesus commented 6 years ago

Hi, I design this logo, I dont know if you are going to like it,

I can change the colours for what you want.

dogcat dogcat2 dogcat3

MarxSoul55 commented 6 years ago

How the software works?

The software uses a machine learning algorithm called a "convolutional neural network". There are several steps to how the program works:

First, it preprocesses a given image. Given an RGB image (analagous to the cones in the human retina), it is first converted to a representation of CIELAB, which is a color space which is similar to how humans see light. You can see this page if you're interested in learning more about how humans process light in the retina. Then (because of my personal limitations in compute power) the image is resized to a small 256x256 square of pixels.

After preprocessing, the image is fed into the network. Convolutional neural networks are a biologically-inspired algorithm—it's similar to how the primary visual cortex works in the human brain. Specifically, the network will slide small, square matrices of numbers across the image and record areas where the pattern of its numbers match the pattern of pixels in the image. It's difficult to explain, so I'll leave you with this excellent reference to explain it more in-depth. For the sake of brevity, just imagine that the convolutional neural network is just a giant math function which converts an image into a vector. In the case of this project, I chose the unit vector "i hat" to represent a cat, and the unit vector "j hat" to represent a dog. You can read more about unit vectors here.

Now the predicted vector is compared to the actual vector via a differentiable error function. For example, if the predicted vector is [0.9, 0] and the correct vector is [1, 0], that means that the convolutional neural network has done a fairly good job of recognizing a cat picture. Now you feed the difference vector [-0.1, 0] into a differentiable error function such as mean squared error. Because the error is differentiable, you can calculate the gradient with respect to each parameter in the convolutional neural network! With the gradient, you can then use an algorithm called "gradient descent" to update the parameters. I highly suggest that you refer to the excellent reference I linked to previously if you want to understand more. Also see the sources I listed in the README.md file in the root of this repository.

After repeated updates of the gradient, the model is trained and then is available for classification. You simply pass the preprocessed image through the "giant math function" and calculate the similarity of its output vector with "i hat" or "j hat" to recognize whether it's a cat or a dog. You can see me doing that in code in model.py in the classify function.

I would explain more but I don't have a lot of free time on my hands. Again, I highly encourage you to check out the learning resources I listed in the README.md if you want to understand how convolutional neural networks work.

Hi, I design this logo, I dont know if you are going to like it, I can change the colours for what you want.

The logos look nice!

Regarding color, could you make the cat orange instead of pink? The white eyes and nose along with the blue pupils are fine as they are.

For the dog, could you make his face light brown? And make his chin and ear a darker brown? The nose and eyes are fine as they are.

Thanks in advance!

nunojesus commented 6 years ago

I will do the changes today and I will send you again.

nunojesus commented 6 years ago

See if its good. dogcat2 dogcat1 text dogcat3 text dogcat2 text dogcat variations

MarxSoul55 commented 6 years ago

Thanks Nuno!

I like all of the ones without the blue or green backgrounds! Can you send me the .png files of those ones?

MarxSoul55 commented 6 years ago

I'm trying to figure out how to embed an image into markdown. Give me a bit and I'll have it up.

MarxSoul55 commented 6 years ago

I got it! The logo is up, and I credited you below it.

Thanks for all your work Nuno!