REPO FOR TEAM PROJECT SHOWCASE AT SPAIC 2019: SMOG DETECTION PROJECT AT #sg_planetearth Udacity Secure and Private AI
The sudden appearance of smog and/or fog on the highway more often than not causes serious and sometimes fatal accidents. Smog is the main agent for severe air pollution. It can aggravate health problems including problems with breathing and sleeping, as well as it can inversely damage plants and forest cover.
- Smog is a byproduct of the global climate change scenario. As we move further into the industrialized age, Smog continues to pollute our air, reduce visibility on roads and is a leading cause of accidents on roads. The primary goal of the project is to avoid and help reduce rate of accidents in self driving vehicles by using this classifier model as one of the key components attached on traffic cams, so that the vehicle can automatically be alerted about smog on the roads/streets (highways) be it in heavy, medium or low traffic in order to adjust it's dynamics like speed, steering rotation, lanes etc. We can use the prediction output labels from the model to alert the vehicle / driver.
This is the descriptive summary of Model Architechture we have implemented, and the Data Augmentations we have applied.
Images captured by traffic cam.
Prediction as label '0'(clear view) or '1'(smog detected).
- transforms.RandomRotation(30), transforms.RandomHorizontalFlip(), transforms.Resize(256), transforms.ColorJitter(0.1), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
So, there are five modules which contain deeper sublayers. Let's go through them one by one:
- CNN layers : 7
- Linear layers : 2
- Pooling layers : 4
- Batch normalization layers : 7
conv1 :
- CNN layers : Conv2d(3, 32, 3, padding=1), Conv2d(32, 32, 3, stride=2, padding=1)
- Pooling layer : MaxPool2d(2, 2)
- Batch normalization layer : BatchNorm2d(32), nn.BatchNorm2d(32),
conv2 :
- CNN layers : Conv2d(32, 64, 3, padding=1), Conv2d(64, 64, 3, stride=2, padding=1)
- Pooling layer : MaxPool2d(2, 2)
- Batch normalization layer : BatchNorm2d(32), nn.BatchNorm2d(64),
conv3 :
- CNN layers : Conv2d(64, 128, 3, padding=1), Conv2d(128, 128, 3, stride=2, padding=1)
- Pooling layer : MaxPool2d(2, 2)
- Batch normalization layer : BatchNorm2d(128), BatchNorm2d(128)
conv4 :
- CNN layers : Conv2d(128, 256, 3, padding=1)
- Pooling layer : MaxPool2d(2, 2)
- Batch normalization layer : BatchNorm2d(256)
fc :
- Linear layers : Linear(256, 128), Linear(128, 2)
mila activation has been used. Activation Mila (@Diganta's new activation) https://github.com/digantamisra98/Mila
Adam optimizer is used here.
CrossEntropyLoss is used.
- lr schedular = StepLR(optimizer, step_size=10, gamma=0.5)
- lr = 0.001
epoch : 50
Test Loss:36.734721
Accuracy: 99.0000
- Test Accuracy of 0: 98% (389/393)
- Test Accuracy of 1: 98% (378/382)
Test Accuracy (Overall): 98% (767/775)
No | Name | Slack Handle |
---|---|---|
1 | Shudipto Trafder | @Shudipto Trafder |
2 | Berenice Terwey | @Berenice |
3 | Agata Gruza | @Agata [OR, USA] |
4 | Ingus Terbets | @Ingus Terbets |
5 | Akash Antony | @Akash Antony |
6 | Alexander Villasoto | @Alexander Villasoto |
7 | Pooja Vinod | @Pooja Vinod |
8 | Ramkrishna Acharya | @Viper |
9 | Sourav Kumar | @sourav kumar |
10 | George Christopoulos | @George Christopoulos |
11 | Sayed Maheen Basheer | @Sayed Maheen Basheer |
12 | Abhishek Lalwani | @Abhishek Lalwani |
13 | Laura Truncellito | @LauraT |
Note: Above folders are just for showcasing type of data used but it's ofcourse not the complete dataset. For complete dataset, you can mail me.