0% found this document useful (0 votes)
6 views5 pages

Tutorial 8 Object Detection - Custom Model

This tutorial provides a comprehensive guide to implementing object detection using the Faster R-CNN model, covering key concepts such as ROI pooling, IOU, and mAP. It outlines a step-by-step process including importing libraries, constructing the backbone and region proposal network, and creating classification and regression heads. Additionally, it includes tasks for practical application, such as modifying layers and training on custom datasets.

Uploaded by

Muhammad Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Tutorial 8 Object Detection - Custom Model

This tutorial provides a comprehensive guide to implementing object detection using the Faster R-CNN model, covering key concepts such as ROI pooling, IOU, and mAP. It outlines a step-by-step process including importing libraries, constructing the backbone and region proposal network, and creating classification and regression heads. Additionally, it includes tasks for practical application, such as modifying layers and training on custom datasets.

Uploaded by

Muhammad Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Tutorial 8:

Object Detection using Faster RCNN (Custom


Model)

Objectives:
• Understand Faster RCNN
• Understand ROI & pooling
• Intersection of Union (IOU)
• Mean Average Precision (mAP)

Here's a step-by-step breakdown:

Step 1 —Import Libraries


We will import the important libraries to get started.

Step 2 Construct the Backbone


We’ll use a simple Convolutional Neural Network (CNN) as our feature
extractor.
Step 3: Constructing the Region Proposal Network
(RPN):
The RPN predicts regions of interest (ROIs) using anchors. Here, we use
two sets of output layers:
• Objectness score: Predicts whether an anchor contains an object
or not.
• Bounding box regression: Adjusts the anchor boxes to fit the
object more precisely.

Step 4: Implement the ROI pooling layer


The ROI Pooling Layer extracts fixed-size feature maps from the ROIs.
Step 5: Create Classification and Regression Heads
After pooling features, we create dense layers to classify objects and predict
bounding box adjustments.

Step 6: Assembling the Complete Faster R-CNN


Model:
We bring all the components together to build the final Faster R-CNN
model.

Step 7: Printing Summary of the model:


The summary of the model can be displayed via
Step 8: Calculating IOU:
To Calculate the IOU

Step 9: Calculating Precision & Recall

Step 10: Calculating Average Precision & mAP


Step 11: Sample Values for Obtaining mAP

Tasks:
• Change the number of layers
• Take a data if you have and just randomly test it what it shows
• Do a labelling of about 150 images through labelling tools and
develop your own model train and test on the data and show
the results.

You might also like