Skip to content

The repository focuses on a two-phase project for RBE549: Computer Vision course. It encompasses two phases: the first focuses on probabilistic boundary detection. The second phase deals with implementing and improving convolutional backbones.

Notifications You must be signed in to change notification settings

hrishikesh-st/EdgeDetection-ConvNetBackbones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Probabilistic Boundary Detection and Improving Convolutional Networks

RBE549: Computer Vision - Worcester Polytechnic Institute, Spring 2024

Project Guidelines:

The project is divided into two phases. The first phase is to implement a probabilistic boundary detection algorithm. The second phase is to implement and improve the performance of the convolutional backbones using different techniques. Details of the project can be found here.

Phase 1: Shake My boundary

Overview:

Phase 1 of the project involves the creation of various filter banks and their application to images for texture, brightness, and color analysis. The primary goal is to generate different maps and gradients that will be used to create a probabilistic boundary detection algorithm.

Steps to run the code:

To run the PBLite boundary detection, use the following command:

python Wrapper.py

Wrappery.py reads input images from "BSDS500" folder and all the ouptuts are stored in the "Outputs" folder.

Input:

Original Image:

Original Image

Outputs:

Following are the outputs generated by the code:

Image Maps:

Image 1 Image 2 Image 3
Texton Map Brightness Map Color Map

Image Gradients:

Image 1 Image 2 Image 3
Texton Gradient Brightness Gradient Color Gradient

Boundary Detection:

Image 1 Image 2 Image 3
Canny Baseline Sobel Baseline PBLite

Phase 2: Deep Dive on Deep Learning

Overview:

Phase 2 of the project involves the implementation of different convolutional backbones and their performance comparison. The primary goal is to implement and improve the performance of the convolutional backbones.

Steps to run the code:

Train the model

python Train.py --NumEpochs <NUMBER_OF_EPOCHS> --MiniBatchSize <BATCH_SIZE> --ModelType <MODEL_TYPE> --CustomLogs <PATH_TO_CUSTOMLOGS>

usage: Train.py [-h] [--CheckPointPath CHECKPOINTPATH] [--NumEpochs NUMEPOCHS] [--DivTrain DIVTRAIN] [--MiniBatchSize MINIBATCHSIZE] [--LoadCheckPoint LOADCHECKPOINT] [--LogsPath LOGSPATH] [--ModelType MODELTYPE] [--CustomLogs CUSTOMLOGS]

optional arguments:
  -h, --help            show this help message and exit
  --CheckPointPath CHECKPOINTPATH
                        Path to save Checkpoints, Default: ../Checkpoints/
  --NumEpochs NUMEPOCHS
                        Number of Epochs to Train for, Default:50
  --DivTrain DIVTRAIN   Factor to reduce Train data by per epoch, Default:1
  --MiniBatchSize MINIBATCHSIZE
                        Size of the MiniBatch to use, Default:1
  --LoadCheckPoint LOADCHECKPOINT
                        Load Model from latest Checkpoint from CheckPointsPath?, Default:0
  --LogsPath LOGSPATH   Path to save Logs for Tensorboard, Default=Logs/
  --ModelType MODELTYPE
                        Model to use for training Model Types are Baseline, BatchNorm, ResNet, ResNeXt, DenseNet, Default:Baseline
  --CustomLogs CUSTOMLOGS
                        Path to save Logs and dynamic plots, Default=../Logs

Example:

python Train.py --NumEpochs 50 --MiniBatchSize 32 --ModelType Baseline --CustomLogs ../Logs

Test the model

python Test.py --ModelPath <PATH_TO_CHECKPOINT> --SelectTestSet False --ModelType Baseline

usage: Test.py [-h] [--ModelPath MODELPATH] [--LabelsPath LABELSPATH] [--SelectTestSet SELECTTESTSET] [--ModelType MODELTYPE] [--ConfusionMatrixPath CONFUSIONMATRIXPATH]

optional arguments:
  -h, --help            show this help message and exit
  --ModelPath MODELPATH
                        Path to load latest model from, Default:ModelPath
  --LabelsPath LABELSPATH
                        Path of labels file, Default:./TxtFiles/LabelsTest.txt
  --SelectTestSet SELECTTESTSET
                        Choose the set to run the test on, Default:True
  --ModelType MODELTYPE
                        Model to use for training Model Types are Baseline, BatchNorm, ResNet, ResNeXt, DenseNet, Default:Baseline
  --ConfusionMatrixPath CONFUSIONMATRIXPATH
                        Path to save the confusion matrix Default:./Logs

Example:

python Test.py --ModelPath ../Checkpoints/Baseline/ --ModelType Baseline

About

The repository focuses on a two-phase project for RBE549: Computer Vision course. It encompasses two phases: the first focuses on probabilistic boundary detection. The second phase deals with implementing and improving convolutional backbones.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages