Skip to content

Feature extractor

Michal W. Tarnowski edited this page Oct 6, 2021 · 2 revisions

Perform feature extraction or import features for a set of images.
Read more: Feature Detection and Extraction

IO settings

image_path

Root path to folder which contains the images.

image_list_path

Optional list of images to read. The list must contain the relative path of the images with respect to the image_path.

ImageReader settings

ImageReader.mask_path

Optional root path to folder which contains image masks. For a given image, the corresponding mask must have the same sub-path below this root as the image has below image_path. The filename must be equal, aside from the added extension .png. For example, for an image image_path/abc/012.jpg, the mask would be mask_path/abc/012.jpg.png. No features will be extracted in regions where the mask image is black (pixel intensity value 0 in grayscale).

ImageReader.camera_model

default: SIMPLE_RADIAL
possible: SIMPLE_PINHOLE, PINHOLE, SIMPLE_RADIAL, RADIAL, OPENCV, OPENCV_FISHEYE, FULL_OPENCV, FOV, SIMPLE_RADIAL_FISHEYE, RADIAL_FISHEYE, THIN_PRISM_FISHEYE
Name of the camera model. See: Camera Models

ImageReader.single_camera

default: 0 (disabled)
Whether to use the same camera for all images.

ImageReader.single_camera_per_folder

default: 0 (disabled)
Whether to use the same camera for all images in the same sub-folder.

ImageReader.single_camera_per_image

default: 0 (disabled)
Whether to use a different camera for each image.

ImageReader.existing_camera_id

default: -1
Whether to explicitly use an existing camera for all images. Note that in this case the specified camera model and parameters are ignored.

ImageReader.camera_params

Manual specification of camera parameters. If empty, camera parameters will be extracted from EXIF, i.e. principal point and focal length.

ImageReader.default_focal_length_factor

default: 1.2
If camera parameters are not specified manually and the image does not have focal length EXIF information, the focal length is set to the value default_focal_length_factor * max(width, height).

ImageReader.camera_mask_path

Optional path to an image file specifying a mask for all images. No features will be extracted in regions where the mask is black (pixel intensity value 0 in grayscale).

SiftExtraction settings

SiftExtraction.num_threads

default: -1
Number of threads for feature extraction.

SiftExtraction.use_gpu

default: 1 (enabled)
Whether to use the GPU for feature extraction.

SiftExtraction.gpu_index

default: -1
Index of the GPU used for feature extraction. For multi-GPU extraction, you should separate multiple GPU indices by comma, e.g. "0,1,2,3". See: Multi-GPU support in feature extraction/matching

SiftExtraction.max_image_size

default: 3200
Maximum image size, otherwise image will be down-scaled.

SiftExtraction.max_num_features

default: 8192
Maximum number of features to detect, keeping larger-scale features.

SiftExtraction.first_octave

default: -1
First octave in the pyramid, i.e. -1 upsamples the image by one level. By convention, the octave of index 0 starts with the image full resolution. Specifying an index greater than 0 starts the scale space at a lower resolution (e.g. 1 halves the resolution). Similarly, specifying a negative index starts the scale space at an higher resolution image, and can be useful to extract very small features (since this is obtained by interpolating the input image, it does not make much sense to go past -1).

SiftExtraction.num_octaves

default: 4
Number of octaves. Increasing the scale by an octave means doubling the size of the smoothing kernel, whose effect is roughly equivalent to halving the image resolution. By default, the scale space spans as many octaves as possible (i.e. roughly log2(min(width, height))), which has the effect of searching keypoints of all possible sizes.

SiftExtraction.octave_resolution

default: 3
Number of levels per octave. Each octave is sampled at this given number of intermediate scales. Increasing this number might in principle return more refined keypoints, but in practice can make their selection unstable due to noise.

SiftExtraction.peak_threshold

default: 0.0067
Peak threshold for detection. This is the minimum amount of contrast to accept a keypoint. Increase to eliminate more keypoints.

SiftExtraction.edge_threshold

default: 10
Edge threshold for detection. Decrease to eliminate more keypoints.

SiftExtraction.estimate_affine_shape

default: 0 (disabled)
Estimate affine shape of SIFT features in the form of oriented ellipses as opposed to original SIFT which estimates oriented disks.

SiftExtraction.max_num_orientations

default: 2
Maximum number of orientations per keypoint if not SiftExtraction.estimate_affine_shape.

SiftExtraction.upright

default: 0 (disabled)
Fix the orientation to 0 for upright features.

SiftExtraction.domain_size_pooling

default: 0 (disabled)
Enable the more discriminative DSP-SIFT features instead of plain SIFT. Domain-size pooling computes an average SIFT descriptor across multiple scales around the detected scale. DSP-SIFT outperforms standard SIFT in most cases.
This was proposed in Domain-Size Pooling in Local Descriptors: DSP-SIFT, J. Dong and S. Soatto, CVPR 2015. This has been shown to outperform other SIFT variants and learned descriptors in Comparative Evaluation of Hand-Crafted and Learned Local Features, Schönberger, Hardmeier, Sattler, Pollefeys, CVPR 2016.

SiftExtraction.dsp_min_scale

default: 0.1667
Domain-size pooling parameters. See: SiftExtraction.domain_size_pooling

SiftExtraction.dsp_max_scale

default: 3
Domain-size pooling parameters. See: SiftExtraction.domain_size_pooling

SiftExtraction.dsp_num_scales

default: 10
Domain-size pooling parameters. See: SiftExtraction.domain_size_pooling

Clone this wiki locally