These can all be run from the command line / terminal:

ellipse_editor[source]

ellipse_editor(seq:"Ignore top-loss ordering and do sequential ordering", files:"Wildcard name for all CSV files to edit"=`'annotations/.csv'*, **imgbank**:"Directory where all the (unlabeled) images are"=*'images/'*, **tldir**:"Directory where 'top losses' info is stored'"=*'top_losses/'`*)

Parameters:

  • seq : <Ignore top-loss ordering and do sequential ordering>

  • files : str <Wildcard name for all CSV files to edit>, optional

  • imgbank : str <Directory where all the (unlabeled) images are>, optional

  • tldir : str <Directory where 'top losses' info is stored'>, optional

The (human) annotations are all shown in green. When available, the ellipse editor will show model predictions ("top losses") such as segmentations masks (in purple), ring counts (in yellow), and bounding boxes (cyan). These indicate differences between annotations and the model's predictions; they can be used to guide the user's attention to annotations that may need revising, and/or as a gauge of the model's performance. ellipse editor screenshot

!ellipse_editor -h
usage: ellipse_editor [-h] [--seq] [--files FILES] [--imgbank IMGBANK]
                      [--tldir TLDIR]

optional arguments:
  -h, --help         show this help message and exit
  --seq              Ignore top-loss ordering and do sequential ordering
                     (default: False)
  --files FILES      Wildcard name for all CSV files to edit (default:
                     annotations/*.csv)
  --imgbank IMGBANK  Directory where all the (unlabeled) images are (default:
                     images/)
  --tldir TLDIR      Directory where 'top losses' info is stored' (default:
                     top_losses/)

Examples:

ellipse_editor --files=annotations_yourlastname/*.csv

See ellipse_editor -h for command-line options. You can, for example, edit only one strike's worth of data by running

ellipse_editor --files=annotations_yourlastname/06241902*.csv

or a range of annotations, as in ellipse editor --files=annotations_yourlastname/06241902_proc_001*.csv

gen_masks[source]

gen_masks(allone:"All objects get assigned to class 1", quiet:"Suppress output log", cp_ann_imgs:"make directory of only images for which annotations exist (to annotated_images/)", files:"Wildcard name for all CSV files to edit"=`'annotations/.csv'*, **maskdir**:"Directory to write segmentation masks to"=*'masks/'*, **step**:"Step size / resolution / precision of ring count"=*1`*)

Generate segmentation masks for all annotations

Parameters:

  • allone : <All objects get assigned to class 1>

  • quiet : <Suppress output log>

  • cp_ann_imgs : <make directory of only images for which annotations exist (to annotated_images/)>

  • files : str <Wildcard name for all CSV files to edit>, optional

  • maskdir : str <Directory to write segmentation masks to>, optional

  • step : float <Step size / resolution / precision of ring count>, optional

!gen_masks -h
usage: gen_masks [-h] [--allone] [--cp_ann_imgs] [--files FILES]
                 [--maskdir MASKDIR] [--step STEP]

Generate segmentation masks for all annotations

optional arguments:
  -h, --help         show this help message and exit
  --allone           All objects get assigned to class 1 (default: False)
  --cp_ann_imgs      make directory of only images for which annotations exist
                     (to annotated_images/) (default: False)
  --files FILES      Wildcard name for all CSV files to edit (default:
                     annotations/*.csv)
  --maskdir MASKDIR  Directory to write segmentation masks to (default: masks/)
  --step STEP        Step size / resolution / precision of ring count (default:
                     1)

gen_bboxes[source]

gen_bboxes(reg:"Set this for regression model (1 class, no steps)", notallone:"All objects DON'T get assigned to same class: 'AN' for antinode", obpr:"Set this for one box per ring", notquiet:"Don't list every filename created", files:"Wildcard name for all (ellipse) CSV files to read"=`'annotations/.csv'*, **bboxdir**:"Directory to write bboxes to"=*'bboxes'*, **step**:"For classification model: Step size / resolution / precision of ring count"=*1`*)

Parameters:

  • reg : <Set this for regression model (1 class, no steps)>

  • notallone : <All objects DON'T get assigned to same class: 'AN' for antinode>

  • obpr : <Set this for one box per ring>

  • notquiet : <Don't list every filename created>

  • files : str <Wildcard name for all (ellipse) CSV files to read>, optional

  • bboxdir : str <Directory to write bboxes to>, optional

  • step : float <For classification model: Step size / resolution / precision of ring count>, optional

!gen_bboxes -h
usage: gen_bboxes [-h] [--reg] [--files FILES] [--bboxdir BBOXDIR] [--step STEP]

optional arguments:
  -h, --help         show this help message and exit
  --reg              Set this for regression model (1 class, no steps) (default:
                     False)
  --files FILES      Wildcard name for all (ellipse) CSV files to read (default:
                     annotations/*.csv)
  --bboxdir BBOXDIR  Directory to write bboxes to (default: bboxes)
  --step STEP        For classification model: Step size / resolution /
                     precision of ring count (default: 1)

gen_crops[source]

gen_crops(files:"Wildcard name for all CSV files to edit"=`'annotations/.csv'*, **outdir**:"Directory to write output cropped images to"=*'crops/'`*)

Generate cropped images for all annotations

Parameters:

  • files : str <Wildcard name for all CSV files to edit>, optional

  • outdir : str <Directory to write output cropped images to>, optional

!gen_crops -h
usage: gen_crops [-h] [--files FILES] [--outdir OUTDIR]

Generate cropped images for all annotations

optional arguments:
  -h, --help       show this help message and exit
  --files FILES    Wildcard name for all CSV files to edit (default:
                   annotations/*.csv)
  --outdir OUTDIR  Directory to write output cropped images to (default: crops/)

grab_recent[source]

grab_recent(dirs:"annotation directories check"=`'annotations'*, **dest**:"Directory to write new annotations to"=*'recent_annotations'`*)

Parameters:

  • dirs : str <annotation directories check>, optional

  • dest : str <Directory to write new annotations to>, optional

!grab_recent -h
usage: grab_recent [-h] [--dirs DIRS] [--dest DEST]

optional arguments:
  -h, --help   show this help message and exit
  --dirs DIRS  annotation directories check (default: annotations*)
  --dest DEST  Directory to write new annotations to (default:
               recent_annotations)

gen_fake[source]

gen_fake(n:"Number of images to generate"=2000, outdir:"Directory to write to"='espiownage-fake')

Generates fake ESPI-like images

Parameters:

  • n : int <Number of images to generate>, optional

  • outdir : str <Directory to write to>, optional

!gen_fake -h
usage: gen_fake [-h] [--n N] [--outdir OUTDIR]

Generates fake ESPI-like images

optional arguments:
  -h, --help       show this help message and exit
  --n N            Number of images to generate (default: 2000)
  --outdir OUTDIR  Directory to write to (default: espiownage-fake)

--shawley, September 2021