Evaluation dataset and tools from Middlebury Stereo Evaulation data 2014.
Project description
stereo-mideval
Python package for dataset and evaluation tools from the Middlebury stereo evaulation 2014 dataset. This project is in development by I3DR for evaluating stereo matching algorithms for use in stereo cameras. However, this project is fully open-source with no limitations to encorage and support others who may need this.
Compatibility
Compatible with python 3.5, 3.6, 3.7, 3.8 on Windows x64 Tested on Windows using Git Actions.
Install
pip install stereo-mideval
Features
- Download scene data from Middlebury servers
- Load disparity image and stereo pair from scene data
- Display normalised colormaped disparity image
- Convert disparity image to depth image using calibration file from scene data
- Evaluation metrics of disparity image compared to ground truth disparity (rmse, mse, bad pixel percentage)
Examples
Download and display data from all scenes in Middlebury stereo dataset (2014)
import os
from stereomideval import Dataset
# Path to dowmload datasets
DATASET_FOLDER = os.path.join(os.getcwd(),"datasets")
# Create dataset folder
if not os.path.exists(DATASET_FOLDER):
os.makedirs(DATASET_FOLDER)
# Initalise stereomideval Dataset object
stmid_dataset = Dataset()
# Get list of scene in dataset (2014) and iterate through them
for scene_name in stmid_dataset.get_scene_list():
# Download dataset from middlebury servers
# will only download it if it hasn't already been downloaded
print("Downloading data for scene '"+scene_name+"'...")
stmid_dataset.download_scene_data(scene_name,DATASET_FOLDER)
# Load scene data from downloaded folder
print("Loading data for scene '"+scene_name+"'...")
scene_data = stmid_dataset.load_scene_data(scene_name,DATASET_FOLDER,True)
Download and display data from a single scene in Middlebury stereo dataset (2014)
import os
from stereomideval import Dataset
# Path to dowmload datasets
DATASET_FOLDER = os.path.join(os.getcwd(),"datasets")
# Scene name (see here for list of scenes: https://vision.middlebury.edu/stereo/data/scenes2014/)
SCENE_NAME = "Adirondack"
# Create dataset folder
if not os.path.exists(DATASET_FOLDER):
os.makedirs(DATASET_FOLDER)
# Initalise stereomideval Dataset object
stmid_dataset = Dataset()
# Download dataset from middlebury servers
# will only download it if it hasn't already been downloaded
print("Downloading data for scene '"+SCENE_NAME+"'...")
stmid_dataset.download_scene_data(SCENE_NAME,DATASET_FOLDER)
# Load scene data from downloaded folder
print("Loading data for scene '"+SCENE_NAME+"'...")
stmid_dataset.load_scene_data(SCENE_NAME,DATASET_FOLDER,True,0)
Download and evaluatuate all scenes in Middlebury stereo dataset (2014)
import os
import numpy as np
from stereomideval import Dataset, Eval
dataset_folder = os.path.join(os.getcwd(),"datasets") #Path to dowmload datasets
# Create dataset folder
if not os.path.exists(dataset_folder):
os.makedirs(dataset_folder)
# Initalise stereomideval objects
stmid_dataset = Dataset()
stmid_eval = Eval()
# Get list of scenes in Milddlebury's stereo dataset (2014) and iterate through them
for scene_name in stmid_dataset.get_scene_list():
# Download dataset from middlebury servers
# will only download it if it hasn't already been downloaded
print("Downloading data for scene '"+scene_name+"'...")
stmid_dataset.download_scene_data(scene_name,dataset_folder)
# Load scene data from downloaded folder
print("Loading data for scene '"+scene_name+"'...")
scene_data = stmid_dataset.load_scene_data(scene_name,dataset_folder,True,1)
gt_disp_image = scene_data.disp_image
# Demonstate evaluation by comparing the ground truth to itelf with a bit of noise
noise = np.random.normal(0, 1.5, gt_disp_image.shape)
test_disp_image = gt_disp_image + noise
rmse = stmid_eval.rmse(gt_disp_image,test_disp_image)
bad_pix_error = stmid_eval.bad_pix_error(gt_disp_image,test_disp_image)
print("RMSE: {:.2f}".format(rmse))
print("Bad pixel 2.0: {:.2f}%".format(bad_pix_error))
Development
Upcomming features
- Offline ranking by caching webpage table data
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stereo-mideval-1.0.17.tar.gz
(17.7 kB
view details)
Built Distribution
File details
Details for the file stereo-mideval-1.0.17.tar.gz
.
File metadata
- Download URL: stereo-mideval-1.0.17.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93842da072a3aae5e32b91ddaf0ae97dda645a071b9981f6322015b9b90eaaeb |
|
MD5 | b200873850ea482960b2e8ca2431ffc4 |
|
BLAKE2b-256 | 4e01c53401193d5f61a46a74f8ea86d011776c3250cb5f097cb9610eb6bb67b5 |
File details
Details for the file stereo_mideval-1.0.17-py3-none-any.whl
.
File metadata
- Download URL: stereo_mideval-1.0.17-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21b0667818ca2d07120bc58f6fe53e33c577f4b6687dd568177c83966605f737 |
|
MD5 | 796aa431b1db719221e1b263ecf6fbe3 |
|
BLAKE2b-256 | 576e5c347709366e9b6af64ac8ddd8e24505a47755545d9f0a0e2f0dc244a5e5 |