Skip to content

pablobiedma/DoF-with-MiDaSv2.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

I've coded this depth.py file aiming at achieving a faster way to computer DoF data of a given image.

Depth of Field Analysis Using MiDaS

Overview

This script uses the MiDaS model to calculate depth information from a set of images. The script generates depth maps, providing a visual representation of depth for each image. Additionally, it computes average, maximum, and minimum depth values, which are stored and can be used for further analysis.

Requirements

  • Python 3.x
  • PyTorch
  • OpenCV
  • Matplotlib
  • NumPy

How to Run

After using pip to install the required libraries simply change the input and output path to your desired path and run depth.py

Examples

Below are examples of the script output showing a side-by-side display of the original images and their depth maps, with the depth statistics printed below each pair.

Example Image 1 Example Image 2

About

Computing Depth of Field using MiDaS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages