Skip to content

Tile-based CNN classifier wrapper + utilities

Notifications You must be signed in to change notification settings

winstonolson/tilepredictor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tilepredictor

Platform agnostic (keras currently supported) wrapper for image tile-based CNN classifiers

Example: generating salience maps using a trained classifier (run_crexp.sh)

#!/bin/bash -v
srcfinderroot=/lustre/bbue/ch4/srcfinder
imagedir=${srcfinderroot}/crexp_sub_bilinear
outdir=$imagedir/salience

package=keras
flavor=xceptionpartial
ppmm_min=250
ppmm_max=4000
tdim=128
tbands=3
tstride=5

weightfile=model_iter196_val_loss0.303678_pid58981.h5
statedir=${srcfinderroot}/tiles/thompson_thorpe_training/state111417
modeldir=${statedir}/cmflab_${ppmm_min}_${ppmm_max}_tdim${tdim}
modelfile=${modeldir}/${flavor}_${package}/${weightfile}

loadfunc=cmf2rgb_load_func.cmf2rgb_load_func_${ppmm_min}_${ppmm_max}

# set CUDA_VISIBLE_DEVICES=0 for gpu, CUDA_VISIBLE_DEVICES='' for cpu
CUDA_VISIBLE_DEVICES=0
CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES} tilepredictor.py -f $flavor \
		    -m $package -w $modelfile --tile_dim $tdim \
		    --tile_bands $tbands --tile_stride $tstride \
		    --image_dir $imagedir --output_dir $outdir \
		    --load_func $loadfunc "ang*img_sub_bilinear"

About

Tile-based CNN classifier wrapper + utilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Shell 1.2%