CV Feature Extract (Model)
Runs an ONNX feature extractor model (DISK, SuperPoint, etc.) on an image and outputs keypoints + descriptors in the standard format for 'CV Match Features (Model)' and 'CV Draw Matches'. All .onnx files in models/onnx (including subdirectories) are listed — pick the right extractor for your matcher. Output parsing supports 3-output models (e.g. DISK: keypoints (1,N,2) + scores (1,N) + descriptors (1,N,D)), flat 2-output models ((1,N,4) + (1,N,D)), and dense score/descriptor maps ((1,C,H,W) + (1,C,H,W)). Preprocessing follows the LightGlue reference implementation and is read off the MODEL, not guessed: pixels are scaled to 0..1, fed as RGB or gray according to the channel count the model declares, and padded up to a multiple of 16 (DISK's U-Net needs it). Keypoints always come back in the INPUT image's pixels. Zero features is a valid result (empty outputs, not an error).
- image
- keypoints
- descriptors
- count
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Image to extract features from (BGR or gray). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| model | COMBO | ONNX feature extractor model from models/onnx (e.g. lightglue/disk.onnx, lightglue/superpoint.onnx). | |
| max_keypoints | INT | 204864–16384 | Maximum keypoints to return, keeping the highest-scoring ones (the models emit keypoints in detection order, not by score). |
| resize_long_side | INT | 10240–8192 | Resize the image so its LONG side is this many pixels before extraction, the way the LightGlue reference implementation does (its own default is 1024). It UPSCALES small images too, which is where most of the keypoints on a small photo come from. 0 keeps the native resolution. Keypoints are mapped back to the input image either way. |
| engineopt | COMBO | auto (default engine) | DNN engine for inference. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| keypoints | CV_KEYPOINTS | cv2.KeyPoint list. |
| descriptors | NPARRAY | (N, D) float32 descriptors. |
| count | INT | Number of detected features. |