ibeis.algo.detect package

Submodules

ibeis.algo.detect.grabmodels module

ibeis.algo.detect.grabmodels.assert_models(modeldir='default', verbose=True)[source]
ibeis.algo.detect.grabmodels.ensure_models(modeldir='default', verbose=True)[source]
Parameters:modeldir (str) –

CommandLine:

python -m ibeis.algo.detect.grabmodels --test-ensure_models

Example

>>> # ENABLE_DOCTEST
>>> from ibeis.algo.detect.grabmodels import *  # NOQA
>>> modeldir = 'default'
>>> result = ensure_models(modeldir)
>>> print(result)
ibeis.algo.detect.grabmodels.get_species_trees_paths(species, modeldir='default')[source]
Parameters:
  • species
  • modeldir (str) –
Returns:

trees_path

Return type:

?

CommandLine:

python -m ibeis.algo.detect.grabmodels --test-get_species_trees_paths

Example

>>> # ENABLE_DOCTEST
>>> from ibeis.algo.detect.grabmodels import *  # NOQA
>>> import ibeis
>>> # build test data
>>> species = ibeis.const.TEST_SPECIES.ZEB_PLAIN
>>> modeldir = 'default'
>>> # execute function
>>> trees_path = get_species_trees_paths(species, modeldir)
>>> # verify results
>>> result = str(trees_path)
>>> print(result)
ibeis.algo.detect.grabmodels.iter_algo_modeldirs(modeldir='default', ensurebase=False)[source]
ibeis.algo.detect.grabmodels.redownload_models(modeldir='default', verbose=True)[source]
Parameters:
  • modeldir (str) – (default = ‘default’)
  • verbose (bool) – verbosity flag(default = True)

CommandLine:

python -m ibeis.algo.detect.grabmodels --test-redownload_models

Example

>>> # SCRIPT
>>> from ibeis.algo.detect.grabmodels import *  # NOQA
>>> result = redownload_models()

ibeis.algo.detect.randomforest module

Interface to pyrf random forest object detection.

ibeis.algo.detect.randomforest.detect(ibs, gpath_list, tree_path_list, **kwargs)[source]
Parameters:
  • gpath_list (list of str) – the list of image paths that need detection
  • tree_path_list (list of str) – the list of trees to load for detection

Kwargs (optional): refer to the PyRF documentation for configuration settings

Returns:iter
ibeis.algo.detect.randomforest.detect_gid_list(ibs, gid_list, tree_path_list, downsample=True, **kwargs)[source]
Parameters:
  • gid_list (list of int) – the list of IBEIS image_rowids that need detection
  • tree_path_list (list of str) – the list of trees to load for detection
  • downsample (bool, optional) –

    a flag to indicate if the original image sizes should be used; defaults to True

    True: ibs.get_image_detectpaths() is used False: ibs.get_image_paths() is used

Kwargs (optional): refer to the PyRF documentation for configuration settings

Yields:results (list of dict)
ibeis.algo.detect.randomforest.detect_gid_list_with_species(ibs, gid_list, species, downsample=True, **kwargs)[source]
Parameters:
  • gid_list (list of int) – the list of IBEIS image_rowids that need detection
  • species (str) – the species that should be used to select the pre-trained random forest model
  • downsample (bool, optional) –

    a flag to indicate if the original image sizes should be used; defaults to True

    True: ibs.get_image_detectpaths() is used False: ibs.get_image_paths() is used

Kwargs (optional): refer to the PyRF documentation for configuration settings

Returns:iter

CommandLine:

python -m ibeis.algo.detect.randomforest --test-detect_gid_list_with_species

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.algo.detect.randomforest import *  # NOQA
>>> from ibeis.algo.detect.randomforest import _get_models  # NOQA
>>> import ibeis
>>> # build test data
>>> ibs = ibeis.opendb('testdb1')
>>> species = ibeis.const.TEST_SPECIES.ZEB_PLAIN
>>> gid_list = ibs.get_valid_gids()
>>> downsample = True
>>> kwargs = {}
>>> # execute function
>>> result = detect_gid_list_with_species(ibs, gid_list, species, downsample)
>>> # verify results
>>> print(result)
ibeis.algo.detect.randomforest.detect_gpath_list_with_species(ibs, gpath_list, species, **kwargs)[source]
Parameters:
  • gpath_list (list of str) – the list of image paths that need detection
  • species (str) – the species that should be used to select the pre-trained random forest model
  • downsample (bool, optional) –

    a flag to indicate if the original image sizes should be used; defaults to True

    True: ibs.get_image_detectpaths() is used False: ibs.get_image_paths() is used

Kwargs (optional): refer to the PyRF documentation for configuration settings

Yields:iter
ibeis.algo.detect.randomforest.train_gid_list(ibs, gid_list, trees_path=None, species=None, setup=True, teardown=False, **kwargs)[source]
Parameters:
  • gid_list (list of int) – the list of IBEIS image_rowids that need detection
  • trees_path (str) – the path that the trees will be saved into (along with temporary training inventory folders that are deleted once training is finished)
  • species (str) – the species that should be used to assign to the newly trained trees

Kwargs (optional): refer to the PyRF documentation for configuration settings

Returns:None
ibeis.algo.detect.randomforest.train_gpath_list(ibs, train_pos_cpath_list, train_neg_cpath_list, trees_path=None, **kwargs)[source]
Parameters:
  • train_pos_cpath_list (list of str) – the list of positive image paths for training
  • train_neg_cpath_list (list of str) – the list of negative image paths for training
  • trees_path (str) – the path that the trees will be saved into (along with temporary training inventory folders that are deleted once training is finished)
  • species (str, optional) – the species that should be used to assign to the newly trained trees

Kwargs (optional): refer to the PyRF documentation for configuration settings

Returns:None

ibeis.algo.detect.yolo module

Interface to pydarknet yolo object detection.

ibeis.algo.detect.yolo.detect(gpath_list, detector=None, config_filepath=None, weight_filepath=None, **kwargs)[source]
Parameters:gpath_list (list of str) – the list of image paths that need detection

Kwargs (optional): refer to the PyDarknet documentation for configuration settings

Returns:iter
ibeis.algo.detect.yolo.detect_gid_list(ibs, gid_list, downsample=False, **kwargs)[source]
Parameters:
  • gid_list (list of int) – the list of IBEIS image_rowids that need detection
  • downsample (bool, optional) –

    a flag to indicate if the original image sizes should be used; defaults to True

    True: ibs.get_image_detectpaths() is used False: ibs.get_image_paths() is used

Kwargs (optional): refer to the PyDarknet documentation for configuration settings

Yields:results (list of dict)

Module contents

ibeis.algo.detect.reassign_submodule_attributes(verbose=True)[source]

why reloading all the modules doesnt do this I don’t know

ibeis.algo.detect.reload_subs(verbose=True)[source]

Reloads ibeis.algo.detect and submodules

ibeis.algo.detect.rrrr(verbose=True)

Reloads ibeis.algo.detect and submodules