I'd like to compute FeatureDistance between two images with a NetGraph:
rs = NetModel["ResNet-152 Trained on ImageNet Competition Data"];
fe = NetTake[rs, {1, -3}]
Ok, so this works:
FeatureNearest[imgs -> {"Index", "Distance"}, FeatureExtractor -> fe]
But then why doesn't this:
FeatureDistance[img1, img2, fe]
Is there a way to turn a NetGraph[]
into a valid FeatureExtractorFunction[]
?
Norm@Differences@fe@{img1,img2 }
$\endgroup$