Git Product home page Git Product logo

sakshikakde / autopano Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 68.61 MB

Panoramic Image stitching using traditional and supervised and unsupervised deep learning methods to compute Homography

Jupyter Notebook 94.24% Python 5.76%
homography panorama image-stitching feature-extraction shi-tomasi-detection sift feature-matching ransac anms non-maximum-suppression feature-descriptors blending deep-learning supervised-learning unsupervised-learning opencv python

autopano's Introduction

Panorama image stitching

The repository describes in brief our solutions for the project 1 of CMSC733. The report is divided into two sections. First section explores the traditional approach to find a homography matrix between a set of two images. Second section describes the implementation of a supervised and an unsupervised deep learn- ing approach of estimating homography between synthetically generated data.

Phase 1: Traditional methood

Sample dataset

Corners Detection

alt

Adaptive Non-Maximal Suppression

alt

Feature Descriptor

After we get the corner points, we need a descriptor to describe the feature for each point. To obtain that, a patch of size 40 × 40 centered at each corner point is used. This patch is then blurred and sub-sampled to a dimension of 8×8, which is then flattened to obtain a 64 × 1 vector.

Feature Matching

alt

RANSAC for outlier rejection and to estimate Robust Homography

alt

Blending Images

alt alt

How to run the code

  • Change the location to the root directory
  • Run the following command:
python3 Wrapper.py --BasePath ./Phase1/ --ImagesFolder Data/Train/Set3 --SaveFolderName Code/Results/Set3 

Parameters

  • BasePath : Location for Phase 1. Eg. /home/sakshi/courses/CMSC733/sakshi_p1/Phase1/
  • ImagesFolder: Location for image folder relative to the BasePath. Eg Data/Test/TestSet2
  • SaveFolderName: Location where you want to save the results relativ BasePath. Eg. Code/Results/TestSet2
  • ShowImages: If you want to view the step outputs. Set as False by default
  • GoSequentially: Go sequentally while stitching or use half split method. Set as false by default.

Phase 2: Deep learning approach

We implemented two deep learning approaches to estimate the homography between two images. The deep model effectively combines corner detection, ANMS, feature extraction, feature matching, RANSAC and estimate homography all into one. This not only makes the approach faster but also makes it robust if the network is generalizable.

Data generation

  • Copy Train, Val and Phase2 (Test data folder was named so in zip file) Folders, to Phase2/Data/
  • cd Phase2/Code
  • To generate required patches and labels for training the models, run,
    python3 DataGenerator.py

Supervised

alt

Training

python3 Train.py --BasePath ../Data/Train_synthetic --CheckPointPath ../Checkpoints/supervised/ --ModelType sup --NumEpochs 100 --DivTrain 1 --MiniBatchSize 64 --LoadCheckPoint 0 --LogsPath ./Logs/supervised/

Testing

python3 Test.py --ModelPath ../Checkpoints/supervised/supervisedModel.h5 --BasePath ../Data/Test_synthetic --SavePath ./Results/ --ModelType sup 

Unsupervised

alt

Training

python3 Train.py --BasePath ../Data/Train_synthetic --CheckPointPath ../Checkpoints/unsupervised/ --ModelType Unsup --NumEpochs 100 --DivTrain 1 --MiniBatchSize 64 --LoadCheckPoint 0 --LogsPath ./Logs/unsupervised/

Testing

python3 Test.py --ModelPath ../Checkpoints/unsupervised/0model.ckpt --BasePath ../Data/Test_synthetic --CheckPointPath ../Checkpoints/unsupervised/ --SavePath ./Results/ --ModelType Unsup

Results

alt

autopano's People

Contributors

h-gokul avatar sakshikakde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

baucheng fatma324

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.