Skip to main content

Image Based Ecological Information System

Project description

ReadTheDocs Pypi Downloads Codecov CircleCI Travis Appveyor

This project is a component of the WildMe / WildBook project: See

IBEIS - Image Analysis

I.B.E.I.S. = Image Based Ecological Information System

"(Note: the rhino and wildebeest mathces may be dubious. Other species do work well though")

Program Description

IBEIS program for the storage and management of images and derived data for use in computer vision algorithms. It aims to compute who an animal is, what species an animal is, and where an animal is with the ultimate goal being to ask important why biological questions. This This repo Image Analysis image analysis module of IBEIS. It is both a python module and standalone program.

Currently the system is build around and SQLite database, a PyQt4 GUI, and matplotlib visualizations. Algorithms employed are: random forest species detection and localization, hessian-affine keypoint detection, SIFT keypoint description, LNBNN identification using approximate nearest neighbors. Algorithms in development are SMK (selective match kernel) for identification and deep neural networks for detection and localization.

The core of IBEIS is the IBEISController class. It provides an API into IBEIS data management and algorithms. The IBEIS API Documentation can be found here:

The IBEIS GUI (graphical user interface) is built on top of the API. We are also experimenting with a new web frontend that bypasses the older GUI code.

## Self Installing Executables:

Unfortunately we have not released self-installing-executables for IBEIS yet. We plan to release these “soon”.

However there are old HotSpotter (the software which IBEIS is based on) binaries available. These can be downloaded from:

Visual Demo

Feature Extraction Nearest Neighbors

Match Scoring

Match Inspection

Spatial Verification

python -m vtool.spatial_verification --test-spatially_verify_kpts --show

Name Scoring

python -m ibeis.algo.hots.chip_match show_single_namematch --qaid 1 --show

Identification Ranking

python -m ibeis.algo.hots.chip_match show_ranked_matches --show --qaid 86


# broken
# python -m ibeis.algo.preproc.preproc_encounter compute_encounter_groups --show

IBEIS Development Environment Setup

NOTE: this section is outdated.

# The following install script install ibeis and all dependencies.
# If it doesnt you can look at the older instructions which follow
# and try to figure it out. After running this you should have a code
# directory with all of the above repos.

# Navigate to your code directory
export CODE_DIR=~/code
mkdir $CODE_DIR

# Clone IBEIS
git clone
cd ibeis

# Install the requirements for super_setup
pip install -r requirements/super_setup.txt

# Install the development requirements (note-these are now all on pypi, so
# this is not strictly necessary)
python ensure

# NOTE: you can use super_setup to do several things
python --help
python versions
python status
python check
python pull

# Run the file in each development repo
python develop

# Or you can also just do to use pypi versions of dev repos:
python develop

# Optional: set a workdir and download a test dataset
.python -m
.python -m -t mtest
python -m -t nauts

python -m ibeis --set-workdir ~/data/work --preload-exit
python -m ibeis -e ensure_mtest

# make sure everyhing is set up correctly
python -m ibeis --db PZ_MTEST

Running Tests

The new way of running tests is with xdoctest, or using the “” script.

Example usage

(Note: This list is far from complete)

# Main Commands
python -m ibeis.main <optional-arguments> [--help]
python -m <optional-arguments> [--help]
# main is the standard entry point to the program
# dev is a more advanced developer entry point

# ** NEW 7-23-2015 **: the following commands are now equivalent and do not
# have to be specified from the ibeis source dir if ibeis is installed
python -m ibeis <optional-arguments> [--help]
python -m <optional-arguments> [--help]

# Useful flags.
# Read code comments in for more info.
# Careful some commands don't work. Most do.
# --cmd          # shows ipython prompt with useful variables populated
# -w, --wait     # waits (useful for showing plots)
# --gui          # starts the gui as well ( does not show gui by default, main does)
# --web          # runs the program as a web server
# --quiet        # turns off most prints
# --verbose      # turns on verbosity
# --very-verbose # turns on extra verbosity
# --debug2       # runs extra checks
# --debug-print  # shows where print statments occur
# -t [test]

# PSA: Workdirs:
# IBEIS uses the idea of a work directory for databases.
# Use --set-workdir <path> to set your own, or a gui will popup and ask you about it
./ --set-workdir /raid/work --preload-exit
./ --set-logdir /raid/logs/ibeis --preload-exit

python -m --set-workdir ~/data/work --preload-exit

# use --db to specify a database in your WorkDir
# --setdb makes that directory your default directory
python -m --db <dbname> --setdb

# Or just use the absolute path
python -m --dbdir <full-dbpath>

# Examples:
# Here are are some example commands
# Run the queries for each roi with groundtruth in the PZ_MTEST database
# using the best known configuration of parameters
python -m --db PZ_MTEST --allgt -t best
python -m --db PZ_MTEST --allgt -t score

# View work dir
python -m --vwd --prequit

# List known databases
python -m -t list_dbs

# Dump/Print contents of params.args as a dict
python -m --prequit --dump-argv

# Dump Current SQL Schema to stdout
python -m --dump-schema --postquit

# Convert a hotspotter database to IBEIS

# NEW: You can simply open a hotspotter database and it will be converted to IBEIS
python -m ibeis convert_hsdb_to_ibeis --dbdir <path_to_hsdb>

# This script will exlicitly conver the hsdb
python -m ibeis convert_hsdb_to_ibeis --hsdir <path_to_hsdb> --dbdir <path_to_newdb>

# Ingest examples
# Ingest raw images
python -m ibeis.dbio.ingest_database --db JAG_Kieryn

# Run Tests

# Test Commands
# Set a default DB First
python -m --setdb --dbdir /path/to/your/DBDIR
python -m --setdb --db YOURDB
python -m --setdb --db PZ_MTEST
python -m --setdb --db PZ_FlankHack

# List all available tests
python -m -t help
# Minimal Database Statistics
python -m --allgt -t info
# Richer Database statistics
python -m --allgt -t dbinfo
# Print algorithm configurations
python -m -t printcfg
# Print database tables
python -m -t tables
# Print only the image table
python -m -t imgtbl
# View data directory in explorer/finder/nautilus
python -m -t vdd

# List all IBEIS databases
python -m ibeis list_dbs
# Delete cache
python -m ibeis delete_cache --db testdb1

# Show a single annotations
python -m ibeis.viz.viz_chip show_chip --db PZ_MTEST --aid 1 --show
# Show annotations 1, 3, 5, and 11
python -m ibeis.viz.viz_chip show_many_chips --db PZ_MTEST --aids=1,3,5,11 --show

# Database Stats for all our important datasets:
python -m --allgt -t dbinfo --db PZ_MTEST | grep -F "[dbinfo]"

# Some mass editing of metadata
python -m --db PZ_FlankHack --edit-notes
python -m --db GZ_Siva --edit-notes
python -m --db GIR_Tanya --edit-notes
python -m --allgt -t dbinfo --db GZ_ALL --set-all-species zebra_grevys

# Current Experiments:

# Main experiments
python -m ibeis --tf draw_annot_scoresep --db PZ_MTEST -a default -t best --show
python -m -e draw_rank_cdf --db PZ_MTEST --show -a timectrl
# Show disagreement cases
ibeis --tf draw_match_cases --db PZ_MTEST -a default:size=20 \
    -t default:K=[1,4] \
    --filt :disagree=True,index=0:4 --show

python -m -t smk2 --allgt --db PZ_MTEST --nocache-big --nocache-query --qindex 0:20
python -m -t smk2 --allgt --db PZ_MTEST --qindex 20:30 --va

# Feature Tuning
python -m -t test_feats -w --show --db PZ_MTEST --allgt --qindex 1:2

python -m -t featparams -w --show --db PZ_MTEST --allgt
python -m -t featparams_big -w --show --db PZ_MTEST --allgt

python -m -t best --db seals2 --allgt

# Testing Distinctivness Parameters
python -m ibeis.algo.hots.distinctiveness_normalizer --test-get_distinctiveness --show --db GZ_ALL --aid 2
python -m ibeis.algo.hots.distinctiveness_normalizer --test-get_distinctiveness --show --db PZ_MTEST --aid 10
python -m ibeis.algo.hots.distinctiveness_normalizer --test-test_single_annot_distinctiveness_params --show --db GZ_ALL --aid 2

# 2D Gaussian Curves
python -m vtool_ibeis.patch --test-test_show_gaussian_patches2 --show

# Test Keypoint Coverage
python -m vtool_ibeis.coverage_kpts --test-gridsearch_kpts_coverage_mask --show
python -m vtool_ibeis.coverage_kpts --test-make_kpts_coverage_mask --show

# Test Grid Coverage
python -m vtool_ibeis.coverage_grid --test-gridsearch_coverage_grid_mask --show
python -m vtool_ibeis.coverage_grid --test-sparse_grid_coverage --show
python -m vtool_ibeis.coverage_grid --test-gridsearch_coverage_grid --show

# Test Spatially Constrained Scoring
python -m ibeis.algo.hots.vsone_pipeline --test-compute_query_constrained_matches --show
python -m ibeis.algo.hots.vsone_pipeline --test-gridsearch_constrained_matches --show

# Test VsMany ReRanking
python -m ibeis.algo.hots.vsone_pipeline --test-vsone_reranking --show
python -m ibeis.algo.hots.vsone_pipeline --test-vsone_reranking --show --homog

# Problem cases with the back spot
python -m ibeis.algo.hots.vsone_pipeline --test-vsone_reranking --show --homog --db GZ_ALL --qaid 425
python -m ibeis.algo.hots.vsone_pipeline --test-vsone_reranking --show --homog --db GZ_ALL --qaid 662
python -m -t custom:score_method=csum,prescore_method=csum --db GZ_ALL --show --va -w --qaid 425 --noqcache
# Shows vsone results with some of the competing cases
python -m ibeis.algo.hots.vsone_pipeline --test-vsone_reranking --show --homog --db GZ_ALL --qaid 662 --daid_list=425,342,678,233

# More rerank vsone tests
python -c "import utool as ut; ut.write_modscript_alias('', '', '--allgt  --db PZ_Master0')"
sh -t custom:rrvsone_on=True custom
sh -t custom:rrvsone_on=True custom --noqcache

# Turning back on name scoring and feature scoring and restricting to rerank a subset
# This gives results that are closer to what we should actually expect
python -m --allgt -t custom \
    custom:rrvsone_on=True,prior_coeff=1.0,unconstrained_coeff=0.0,fs_lnbnn_min=0,fs_lnbnn_max=1 \
    custom:rrvsone_on=True,prior_coeff=0.5,unconstrained_coeff=0.5,fs_lnbnn_min=0,fs_lnbnn_max=1 \
    custom:rrvsone_on=True,prior_coeff=0.1,unconstrained_coeff=0.9,fs_lnbnn_min=0,fs_lnbnn_max=1 \

# VsOneRerank Tuning: Tune linar combination
python -m --allgt -t \
    custom:fg_weight=0.0 \
    custom:rrvsone_on=True,prior_coeff=1.0,unconstrained_coeff=0.0,fs_lnbnn_min=0.0,fs_lnbnn_max=1.0,nAnnotPerNameVsOne=200,nNameShortlistVsone=200 \
    custom:rrvsone_on=True,prior_coeff=.5,unconstrained_coeff=0.5,fs_lnbnn_min=0.0,fs_lnbnn_max=1.0,nAnnotPerNameVsOne=200,nNameShortlistVsone=200 \
  --db PZ_MTEST
#--print-confusion-stats --print-gtscore

# Testing no affine invaraiance and rotation invariance
python -m -t custom:AI=True,RI=True custom:AI=False,RI=True custom:AI=True,RI=False custom:AI=False,RI=False --db PZ_MTEST --show

Caveats / Things we are not currently doing

  • We do not add or remove points from kdtrees. They are always rebuilt

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ibeis, version 2.2.4
Filename, size File type Python version Upload date Hashes
Filename, size ibeis-2.2.4-py2.py3-none-any.whl (1.4 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size ibeis-2.2.4-py3-none-any.whl (1.4 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ibeis-2.2.4.tar.gz (1.3 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page