Week 3 — Waste Classification

Umut Piri
bbm406f19
Published in
3 min readDec 19, 2019

Hi everyone,we are Hasan AKALP ,Umut PİRİ & Dilara İŞERİ. For our semester project in Machine Learning Course we are trying to waste classification. This week we will talk about what to use.

Convolutional Neural Network (CNN)

We are going to use CNN algorithm in our project to classify the waste images. CNN is a Deep Learning algorithm which can take in an input image, assign importance (learnable weights and biases) to various aspects/objects in the image and be able to differentiate one from the other. The pre-processing required in a CNN is much lower as compared to other classification algorithms. While in primitive methods filters are hand-engineered, with enough training, CNN have the ability to learn these filters/characteristics.

The architecture of a CNN is analogous to that of the connectivity pattern of Neurons in the Human Brain and was inspired by the organization of the Visual Cortex. Individual neurons respond to stimuli only in a restricted region of the visual field known as the Receptive Field. A collection of such fields overlap to cover the entire visual area.

PyTorch

PyTorch is an open-source machine learning library for Python which allows maximum flexibility and speed on scientific computing for deep learning. It is a replacement for NumPy to use the power of GPUs. Since it uses the GPU for calculations, it is way faster than CPU based calculations.

PyTorch uses tensors instead of numpy arrays. A tensor is an n-dimensional data container which is similar to NumPy’s ndarray. For example, 1d-tensor is a vector, 2d-tensor is a matrix, 3d-tensor is a cube, and 4d-tensor is a vector of cubes.

Data Augmentation

Data augmentation is a strategy that enables practitioners to significantly increase the diversity of data available for training models, without actually collecting new data. Data augmentation techniques such as cropping, padding, and horizontal flipping are commonly used to train large neural networks. However, most approaches used in training neural networks only use basic types of augmentation. While neural network architectures have been investigated in depth, less focus has been put into discovering strong types of data augmentation and data augmentation policies that capture data invariances.

We are going to use torchvision.transforms achieve this. With this library we can apply operations like flipping, rotating, color jittering, cropping, affine and scaling. By these operations we will enlarge our dataset.

Transfer Learning

Transfer learning is a machine learning method where a model developed for a task is reused as the starting point for a model on a second task. It is a popular approach in deep learning where pre-trained models are used as the starting point on computer vision and natural language processing tasks given the vast compute and time resources required to develop neural network models on these problems and from the huge jumps in skill that they provide on related problems.

--

--