Inspiration

The main inspiration of this project mainly evolved around the concepts of deep learning, mainly machine learning. Machine learning revolves around training algorithms to identify relationships and patterns in data sets.

What it does

The main objective of this algorithm is to be able identify and differentiate between images that contain aliens and images that contain humans. The required outcome was a code that could, if provided with an image, decide whether the image contained a human or an alien.

How we built it

A form of Deep learning the relies on patterns and relationships between images called CNN or central neural network has been employed. The chosen coding language is Python and and it uses Tensor flow. The TensorFlow image classification models are useful for single-label classification; that is, predicting which single label the image is most likely to represent. So in this case there are only two labels- Aliens and Humans because the images have to be divided into these two classes. Following this cv2 is imported which is basically used to read images from the specified files. A library called imghdr is imported to determine the type of image and so that only images with a certain file format can be used. The numpy library and matplotlib are used to read images and display them. Following this the images are cut into three sectors- Train, Validate and Test. As the name signifies the first class, is used to train the algorithm into identifying aliens and humans. The second one is used to confirm whether the initial algorithm works and whether the images identified as aliens are actually aliens or not. Lastly, Test is used to provide the algorithm with pictures to identify. After this, we create the CNN using 3 layers namely convolution, pooling and a fully connected layer. Then to verify the reliability/ efficiency of the algorithm, a loss graph and accuracy graph is produced. These are plotted using loss values and accuracy values. The model analyzes the image and assigns it a value between 0 and 1 based on interpretation from the train stage. If the value is greater than 0.5 then the image has a human or else they contain an alien.

Challenges

The main problem we faced included making the database and the CNN model. Firstly the database required large amounts of images to be required and collecting and organizing these files proved to be a real problem. Secondly, creating the AI model itself was quite a difficult task simply because of our inexperience, however we did manage to successfully create it in the end.

What we learned

Some important lessons we learned during the course of making the process include the making of the an Ai model, the importance of organization and handling large amounts of data within data sets.

Built With

Share this project:

Updates

Private user

Private user posted an update

new_resize = tf.image.resize(new_img, (256,256))

If you change the above line to the bottom line, It works flawlessly. Hopefully ;) new_resize = tf.image.resize(cv2.cvtColor(new_img, cv2.COLOR_BGR2RGB),(256,256))

Log in or sign up for Devpost to join the conversation.