asap.pointmatch package
Submodules
asap.pointmatch.create_tilepairs module
- class asap.pointmatch.create_tilepairs.TilePairClientModule(schema_type=None, *args, **kwargs)[source]
Bases:
RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
TilePairClientParameters
- client_class = 'org.janelia.render.client.TilePairClient'
- client_script_name = 'run_ws_client.sh'
- default_output_schema
alias of
TilePairClientOutputParameters
- default_schema
alias of
TilePairClientParameters
asap.pointmatch.generate_point_matches_qsub module
- class asap.pointmatch.generate_point_matches_qsub.PointMatchClientModuleQsub(schema_type=None, *args, **kwargs)[source]
Bases:
RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RenderParameters
asap.pointmatch.generate_point_matches_spark module
- class asap.pointmatch.generate_point_matches_spark.PointMatchClientModuleSpark(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]
Bases:
SparkModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
PointMatchClientParametersSpark
- default_output_schema
alias of
PointMatchClientOutputSchema
- default_schema
alias of
PointMatchClientParametersSpark
- classmethod get_pointmatch_args(baseDataUrl=None, owner=None, collection=None, pairJson=None, SIFTfdSize=None, SIFTminScale=None, SIFTmaxScale=None, SIFTsteps=None, matchRod=None, matchModelType=None, matchIterations=None, matchMaxEpsilon=None, matchMinInlierRatio=None, matchMinNumInliers=None, matchMaxNumInliers=None, matchMaxTrust=None, maxFeatureCacheGb=None, clipWidth=None, clipHeight=None, renderScale=None, renderWithFilter=None, renderWithoutMask=None, renderFullScaleWidth=None, renderFullScaleHeight=None, fillWithNoise=None, rootFeatureDirectory=None, renderFilterListName=None, requireStoredFeatures=None, matchFilter=None, **kwargs)[source]
asap.pointmatch.schemas module
- class asap.pointmatch.schemas.CollectionId(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
Schema
key
description
default
field_type
json_type
owner
owner of collection
(REQUIRED)
str
name
name of collection
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
Schema
key
description
default
field_type
json_type
collectionId
collection identifying details
(REQUIRED)
dict
pairCount
number of tile pairs in collection
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientParametersQsub(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
,SIFTPointMatchParameters
,SparkOptions
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Path to the spark home directory
/allen/aibs/pipeline/image_processing/volume_assembly/utils/spark
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
parameters to connect to render server
(REQUIRED)
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
pbs_template
pbs template to wrap spark job
(REQUIRED)
str
no_nodes
Number of nodes to run the pbs job
30
int
ppn
Number of processors per node (default = 30)
30
int
queue_name
Name of the queue to submit the job
connectome
str
logdir
location to set logging for qsub command
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientParametersSpark(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
SparkParameters
,SIFTPointMatchParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
no description
NA
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
masterUrl
spark master url. For local execution local[num_procs,num_retries]
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchOpenCVParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
ndiv
one tile per tile pair subdivided into ndiv x ndiv for easier homography finding
8
int
matchMax
per tile pair limit, randomly chosen after SIFT and RANSAC
1000
int
downsample_scale
passed to cv2.resize(fx=, fy=)
0.3
float
SIFT_nfeature
passed to cv2.xfeatures2d.SIFT_create(nfeatures=)
20000
int
SIFT_noctave
passed to cv2.xfeatures2d.SIFT_create(nOctaveLayers=)
3
int
SIFT_sigma
passed to cv2.xfeatures2d.SIFT_create(sigma=)
1.5
float
RANSAC_outlier
passed to cv2.findHomography(src, dst, cv2.RANSAC, outlier)
5.0
float
FLANN_ntree
passed to cv2.FlannBasedMatcher()
5
int
FLANN_ncheck
passed to cv2.FlannBasedMatcher()
50
int
ratio_of_dist
ratio in Lowe’s ratio test
0.7
float
CLAHE_grid
tileGridSize for cv2 CLAHE
None
int
CLAHE_clip
clipLimit for cv2 CLAHE
None
float
pairJson
full path of tilepair json
NA
str
input_stack
Name of raw input lens data stack
NA
str
match_collection
name of point match collection
NA
str
ncpus
number of CPUs to use
-1
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SIFTPointMatchParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
ArgSchema
,FeatureExtractionParameters
,FeatureRenderParameters
,FeatureRenderClipParameters
,FeatureStorageParameters
,MatchDerivationParameters
,RenderParametersMatchWebServiceParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
no description
NA
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SwapPointMatches(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
match_owner
Match collection owner name
(REQUIRED)
str
source_collection
Source point match collection
(REQUIRED)
str
target_collection
Target point match collection
(REQUIRED)
str
zValues
List of integer group ids
(REQUIRED)
int
pool_size
Pool size
5
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SwapPointMatchesOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
source_collection
Source point match collection
(REQUIRED)
str
target_collection
Target point match collection
(REQUIRED)
str
swapped_zs
List of group ids that got swapped
(REQUIRED)
int
nonswapped_zs
List of group ids that did not get swapped
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.TilePairClientOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
tile_pair_file
location of json file with tile pair inputs
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.TilePairClientParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
stack
input stack to which tilepairs need to be generated
(REQUIRED)
str
baseStack
Base stack
None
str
minZ
z min for generating tilepairs
None
int
maxZ
z max for generating tilepairs
None
int
xyNeighborFactor
Multiply this by max(width, height) of each tile to determine radius for locating neighbor tiles
0.9
float
zNeighborDistance
Look for neighbor tiles with z values less than or equal to this distance from the current tile’s z value
2
int
excludeCornerNeighbors
Exclude neighbor tiles whose center x and y is outside the source tile’s x and y range respectively
True
bool
excludeSameLayerNeighbors
Exclude neighbor tiles in the same layer (z) as the source tile
False
bool
excludeCompletelyObscuredTiles
Exclude tiles that are completely obscured by reacquired tiles
True
bool
output_dir
Output directory path to save the tilepair json file
(REQUIRED)
str
memGB
Memory for the java client to run
6G
str
- opts = <marshmallow.schema.SchemaOpts object>