wbia.templates package¶
Submodules¶
wbia.templates.generate_notebook module¶
- CommandLine:
# Generate and start an IPython notebook python -m wbia –tf autogen_ipynb –ipynb –db <dbname> [-a <acfg>] [-t <pcfg>]
python -m wbia –tf autogen_ipynb –ipynb –db seaturtles -a default2:qhas_any=(left,right),sample_occur=True,occur_offset=[0,1,2],num_names=1
- CommandLine:
# to connect to a notebook on a remote machine that does not have the # appropriate port exposed you must start an SSH tunnel. # Typically a jupyter-notebook runs on port 8888. # Run this command on your local machine. ssh -N -f -L localhost:<local_port>:localhost:<remote_port> <remote_user>@<remote_host>
E.G. ssh -N -f -L localhost:8889:localhost:8888 joncrall@hyrule.cs.rpi.edu # Now you can connect locally firefox localhost:8889
# Running a server: jupyter-notebook password jupyter-notebook –no-browser –NotebookApp.iopub_data_rate_limit=100000000 –NotebookApp.token=
# To allow remote jupyter-noteobok connections jupyter notebook –generate-config
# Really need to do jupyter hub
need to set c.NotebookApp.port = 8888 c.NotebookApp.open_browser = False c.NotebookApp.ip = ‘*’
-
wbia.templates.generate_notebook.
autogen_ipynb
(ibs, launch=None, run=None)[source]¶ Autogenerates standard IBEIS Image Analysis IPython notebooks.
- CommandLine:
python -m wbia autogen_ipynb –run –db lynx python -m wbia autogen_ipynb –run –db lynx
python -m wbia autogen_ipynb –ipynb –db PZ_MTEST -p :proot=smk,num_words=64000 default python -m wbia autogen_ipynb –ipynb –db PZ_MTEST –asreport python -m wbia autogen_ipynb –ipynb –db PZ_MTEST –noexample –withtags python -m wbia autogen_ipynb –ipynb –db PZ_MTEST
python -m wbia autogen_ipynb –ipynb –db STS_SandTigers
python -m wbia autogen_ipynb –db PZ_MTEST # TODO: Add support for dbdir to be specified python -m wbia autogen_ipynb –db ~/work/PZ_MTEST
python -m wbia autogen_ipynb –ipynb –db Oxford -a default:qhas_any=(query,),dpername=1,exclude_reference=True,dminqual=good python -m wbia autogen_ipynb –ipynb –db PZ_MTEST -a default -t best:lnbnn_normalizer=[None,normlnbnn-test]
python -m wbia.templates.generate_notebook –exec-autogen_ipynb –db wd_peter_blinston –ipynb
python -m wbia autogen_ipynb –db PZ_Master1 –ipynb python -m wbia autogen_ipynb –db PZ_Master1 -a timectrl:qindex=0:100 -t best best:normsum=True –ipynb –noexample python -m wbia autogen_ipynb –db PZ_Master1 -a timectrl –run jupyter-notebook Experiments-lynx.ipynb killall python
python -m wbia autogen_ipynb –db humpbacks –ipynb -t default:proot=BC_DTW -a default:has_any=hasnotch python -m wbia autogen_ipynb –db humpbacks –ipynb -t default:proot=BC_DTW default:proot=vsmany -a default:has_any=hasnotch,mingt=2,qindex=0:50 –noexample
python -m wbia autogen_ipynb –db testdb_curvrank –ipynb -t default:proot=CurvRankDorsal python -m wbia autogen_ipynb –db testdb_curvrank –ipynb -t default:proot=CurvRankFluke python -m wbia autogen_ipynb –db PW_Master –ipynb -t default:proot=CurvRankDorsal
python -m wbia autogen_ipynb –db testdb_identification –ipynb -t default:proot=Deepsense
- Ignore:
- python -m wbia autogen_ipynb –db WS_ALL
Example
>>> # SCRIPT >>> from wbia.templates.generate_notebook import * # NOQA >>> import wbia >>> ibs = wbia.opendb(defaultdb='testdb1') >>> result = autogen_ipynb(ibs) >>> print(result)
-
wbia.templates.generate_notebook.
get_default_cell_template_list
(ibs)[source]¶ Defines the order of ipython notebook cells
-
wbia.templates.generate_notebook.
make_wbia_notebook
(ibs)[source]¶ Parameters: ibs (wbia.IBEISController) – wbia controller object - CommandLine:
- python -m wbia.templates.generate_notebook –exec-make_wbia_notebook –db wd_peter_blinston –asreport python -m wbia –tf –exec-make_wbia_notebook python -m wbia –tf make_wbia_notebook –db lynx jupyter-notebook tmp.ipynb runipy tmp.ipynb –html report.html runipy –pylab tmp.ipynb tmp2.ipynb sudo pip install runipy python -c “import runipy; print(runipy.__version__)”
Example
>>> # SCRIPT >>> from wbia.templates.generate_notebook import * # NOQA >>> import wbia >>> ibs = wbia.opendb(defaultdb='testdb1') >>> notebook_str = make_wbia_notebook(ibs) >>> print(notebook_str)
wbia.templates.notebook_cells module¶
- ComamndLine:
- python -m wbia –tf autogen_ipynb –ipynb –db PZ_MTEST –ipynb
-
wbia.templates.notebook_cells.
dataset_summary_stats_hacktest
()[source]¶ import wbia ibs = wbia.opendb(‘WWF_Lynx_Copy’) # import wbia # ibs = wbia.opendb(‘WWF_Lynx’) a = [
‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=left,dcrossval_enc=1,joinme=1’, ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=left,dcrossval_enc=2,joinme=2’, ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=left,dcrossval_enc=3,joinme=3’, ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=left,dcrossval_enc=4,joinme=4’,
# ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=right,dcrossval_enc=1,joinme=1’, # ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=right,dcrossval_enc=2,joinme=2’, # ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=right,dcrossval_enc=3,joinme=3’, # ‘default:max_timestamp=now,minqual=good,require_timestamp=True,view=right,dcrossval_enc=4,joinme=4’,
] acfg_list, expanded_aids_list = wbia.expt.experiment_helpers.get_annotcfg_list(
ibs, acfg_name_list=a, verbose=0)expt_aids = sorted(set(ut.total_flatten(expanded_aids_list))) print(ut.repr2(ibs.get_annot_stats_dict(expt_aids, strkeys=True, nl=2, use_hist=True)))
# expt_qaids = sorted(set(ut.total_flatten(ut.take_column(expanded_aids_list, 0)))) # print(ut.repr2(ibs.get_annot_stats_dict(expt_qaids, strkeys=True, nl=2, use_hist=True)))
wbia.templates.notebook_helpers module¶
Module contents¶
-
wbia.templates.
IMPORT_TUPLES
= [('generate_notebook', None), ('notebook_cells', None)]¶ cd /home/joncrall/code/wbia/wbia/templates makeinit.py –modname=wbia.templates
Type: Regen Command
-
wbia.templates.
reassign_submodule_attributes
(verbose=True)[source]¶ why reloading all the modules doesnt do this I don’t know
-
wbia.templates.
rrrr
(verbose=True)¶ Reloads wbia.templates and submodules