WorkSafe-ML is a project that aims to classify if people are wearing their safety gear correctly in fields like chemistry labs, health care and more. We initially start out with a model that can classify what kind of safety gear is being worn.
- idea to start out
- Data Gathering and Annotation
- Label Bounding Boxes
- Split the Dataset into Train and Test sets
- Quick Summary
- Input Image ex: (1,28,28) where 1 is the channels, 28 is the height and 28 is the width. (initial feature map)
- Convolutional Layer: The amount of filters will be the amount of channels in the next layer.
- The filter can be seen as a matrix of weights that are applied to the input image. (kernel size is the size of the filter)
- a filter is applied to the input image and the output is a feature map
- (original image size - kernel size + 1) is the height and width of the feature map. while amount of filters applied at the channels for the next layer.
- after appling this we get the next layer which is called the feature map
- Pooling Layer: This is used to reduce the size of the feature map. (usually a 2x2 filter, but can be different, this is to help against rotations)
- Flattening: This is to make the data 1D so that it can be fed into a fully connected layer.
- Fully connected layer will then use MLP method to classify the image, at the end
-
- Regional Proposal (Selective Search) 2000 candidate regions
-
- Crop + CNN for Each Region (Crop the image so that region is resixed into fixed and run a CNN) ConvNet
-
- We do classification converting to a feature vector and feed to VM for classification, we also generate the bounding box.
- Puts full image through CNN then in feature space you have region propsal method.
- then resize them
- goes through a fully connected layer and linear regression to get the bounding box.
- linear + softmax for classification, probability of each class.
- Still not fast enough, so we use Faster R-CNN
- Key difference is Region Proposal Network. (RPN)
- R-CNN and Fast-CNN use selective search
- Image goes through CNN, initially a feature map.
- Seperate network is for region proposal.
- Region Proposal Network:
- The predicted regions are reshaped and fed into the classifer to predict the object class and bounding box
-
Object Detection + Segmentation (Instance Segmentation)
-
Object Detection: It detects objects in an image using bounding boxes
-
Approach to Semantic segmentation: Ie creating a pixel-wise mask for each object
-
(assign an object class to each pixel so mapping out the object)
- We determine the bounding box of object using Faster R-CNN
- Some notes Pooling is for downsizing, Stride is the amount of pixels we move the filter by.
- We use ROI Align,
- Stride being quantized is
- Object Localization: Class + Bounding Box
- Pc: Probability of object
- Bx, By, Bw, Bh: Bounding Box x, y are center w,h are height and width
- C1, C2, C3: Class
- Split the image into grid cells (ex 4x4)
- For each grid cell, we can predict the bounding box and class. [Pc, Bx, By, Bw, Bh, C1, C2, C3]
- PC is the probability of that object being in that grid cell.
- Each coordinate is normalized between 0 and 1 between the grid cell.
- multi part loss that penalizes (x,y,w,h) mistakes
- confidence errors where box with high confidence doesn't contain an object
- classification errors
- anchor boxes in yolo
- YOLO outputs multiple bounding boxes per grid cell, and many may overlap or be duplicates.
- NMS is applied
- Sort the boxes by confidence score
- Select the box with highest confidence score
- Remove any boxes that have high IOU with the selected box.
- Yields the final set of detections with minimal overlap.
- Note: For all boxes for a specific class we try to find overlap.