Nodes/comfyui_cv/CV Feature Extract (Model)
ComfyUI Node

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).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Feature Extract (Model)
  • image
  • keypoints
  • descriptors
  • count
model
max_keypoints2048
resize_long_side1024
engineauto (default engine)
Categoryimage/CV/dnn

Inputs (5)

NameTypeDefaultDescription
imageNPARRAY,IMAGEImage 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.
modelCOMBOONNX feature extractor model from models/onnx (e.g. lightglue/disk.onnx, lightglue/superpoint.onnx).
max_keypointsINT204864–16384Maximum keypoints to return, keeping the highest-scoring ones (the models emit keypoints in detection order, not by score).
resize_long_sideINT10240–8192Resize 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.
engineoptCOMBOauto (default engine)DNN engine for inference.

Outputs (3)

NameTypeDescription
keypointsCV_KEYPOINTScv2.KeyPoint list.
descriptorsNPARRAY(N, D) float32 descriptors.
countINTNumber of detected features.