CINXE.COM

D2-Net - Wolfram Neural Net Repository

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="ssi-loaded" content="true" /> <link rel="stylesheet" href="https://www.wolframcdn.com/fonts/source-sans-pro/1.0/global.css"> <link rel="stylesheet" href="https://www.wolframcloud.com//obj/resourcesystem/webresources/global-wolfram-skinny-2/1.2.0/main.css"> <script src="https://www.wolframcdn.com/consent/cookie-consent.js"></script> <script> !function(){if(/.*(__cookie_consent=(1|2)).*/i.test(document.cookie)){var e=function(){switch(!1){case-1===location.hostname.indexOf("devel"):return"//wal.devel.wolfram.com";case-1===location.hostname.indexOf("test"):return"//wal.test.wolfram.com";default:return"//wal.wolfram.com"}}();a=window,t=document,l="script",o=e,n="3.0.0",c="wal",a.WolframAnalyticsObject=c,a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)},a[c].q=a[c].q||[],a[c].t=1*new Date,a[c].d=o,a[c].v=n,r=t.createElement(l),w=t.getElementsByTagName(l)[0],r.async=1,r.src=o+"/js/"+n+"/wal.js",w.parentNode.insertBefore(r,w),wal("queue",!0),wal("batch",!0),wal("log","pageload"),wal("log","usermeta"),wal("batch",!1),wal("queue",!1);wal("addListener","click",{key:"walgc",levels:5,is:{el:["a","area","button"],attr:["data-walid"]},not:{attr:["data-walgcexclude"]},prop:["href"],attr:["data-walid"]})}var a,t,l,o,n,c,r,w}(); </script> <link rel="apple-touch-icon" sizes="180x180" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon-16x16.png"> <link rel="manifest" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/site.webmanifest"> <link rel="mask-icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/safari-pinned-tab.svg" color="#609125"> <link rel="shortcut icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon.ico"> <meta name="msapplication-TileColor" content="#609125"> <meta name="msapplication-config" content="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/browserconfig.xml"> <meta name="theme-color" content="#609125"> <title>D2-Net - Wolfram Neural Net Repository</title> <meta name="description" content="Find generic keypoints and their feature vectors in an image" /> <link rel="stylesheet" href="https://www.wolframcdn.com/css/normalize.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/main.css" /> </head> <body id="shingle"> <header id="gws-header"> <nav class="wrap"> <ul> <li><a href="https://www.wolfram.com/" target="gws-header">Wolfram.com</a></li> <li><a href="https://www.wolframalpha.com/" target="gws-header">WolframAlpha.com</a></li> <li><a href="https://www.wolframcloud.com/" target="gws-header">WolframCloud.com</a></li> </ul> </nav> </header> <header id="pac-common-header" class="container" data-disable-auth="true" data-publisher-ids-url="https://resources.wolframcloud.com/user/publishers" > <div class="wrap"> <div class="header-top"> <a href="https://resources.wolframcloud.com/NeuralNetRepository/" ><div class="logo-frame"><svg class="logo" id="iconGroup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 36" width="70" height="70" > <defs> <style> .iconAdditional2 { fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 0.25px; } .iconMain2 { fill: #ffffff; } .iconAdditional2, .iconAlternate2 { fill: #bebebe; } </style> </defs> <path id="white2" class="iconAdditional2" d="M19.58253,32.2817l13.25-9.4918m0-9.4918-13.25-9.4918m0,18.9836,13.25-9.4918m-13.25,0h13.25m-13.25,9.4918h13.25m-13.25,9.4918,13.25-18.9836m-13.25-9.4918,13.25,18.9836m-13.25-9.4918,13.25,9.4918m-29-14.2377,15.75-4.7459M3.83253,18.044l15.75-4.7459m-15.75,14.2377,15.75-4.7459m0-9.4918-15.75-4.7459m15.75,14.2377L3.83253,8.5522m15.75,23.7295L3.83253,8.5522m0,9.4918,15.75-14.2377m-15.75,23.7295,15.75-23.7295M3.83253,18.044l15.75,4.7459m0-9.4918-15.75,14.2377m0-9.4918,15.75,14.2377m-15.75-4.7459,15.75,4.7459" /> <path id="white1" class="iconMain2" d="M21.96587,3.38333A2.38333,2.38333,0,1,1,19.58253,1,2.38333,2.38333,0,0,1,21.96587,3.38333Zm-2.38333,7.55724a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,10.94058Zm0,9.44018a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,20.38076Zm0,9.44018a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,29.82093Z" /> <path id="gray2" class="iconAlternate2" d="M35.66507,12.82351a2.38333,2.38333,0,1,1-2.38333-2.38333A2.38333,2.38333,0,0,1,35.66507,12.82351Zm-2.38333,8.05764a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,33.28173,20.88116Z" /> <path id="gray1" class="iconAlternate2" d="M5.76667,8.10342A2.38333,2.38333,0,1,1,3.38333,5.72009,2.38333,2.38333,0,0,1,5.76667,8.10342ZM3.38333,15.66067A2.38333,2.38333,0,1,0,5.76667,18.044,2.38333,2.38333,0,0,0,3.38333,15.66067Zm0,9.94058a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,3.38333,25.60125Z" /> </svg> </div > <div class="text"> <h1 class="site-title"> <span class="wordmark">Wolfram Neural Net Repository</span > </h1> <p class="tagline">Immediate Computable Access to <span class="nobr">Neural Net Models</span></p ></div ></a> </div> </div> <nav id="pac-common-navigation"> <h2 class="visuallyhidden">Primary Navigation</h2> <div class="wrap"> <div class="section search-wrapper"> <div id="react-autocomplete" data-action="https://resources.wolframcloud.com/NeuralNetRepository/search/" data-resources-base-url="https://resources.wolframcloud.com/NeuralNetRepository/resources/" data-autocomplete-json="https://resources.wolframcloud.com/NeuralNetRepository/autocomplete/allnames.json" > <form id="repo-header-search-form" role="search" action="https://resources.wolframcloud.com/NeuralNetRepository/search/" method="get" > <input type="search" name="i" required="required" placeholder="Search" /> </form> </div> </div ><div class="section sorting-properties"> <ul> <li> <button class="nav-button"> <span class="label">Input Domains</span ><svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path class="arrow-down" d="M4,4l4,4l4-4" /> <path class="arrow-right" d="M6,2l4,4l-4,4" /> </svg> </button> <div class="dropdown closed"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Audio/">Audio</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Image/">Image</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Numeric/">Numeric</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Text/">Text</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Video/">Video</a></li > </ul> <div class="other-nav-pages"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/random"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><g><path d="M54 14v6H44c-3.08 0-5.41 2.19-7.55 4.8-1.54 1.86-3.01 4.1-4.46 6.4a63.36 63.36 0 0 0-4.45-6.4C25.4 22.18 23.08 20 20 20H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c.91 0 2.58 1.06 4.45 3.33A74.99 74.99 0 0 1 29.64 35a74.99 74.99 0 0 1-5.2 7.67C22.59 44.94 20.92 46 20 46H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c3.08 0 5.4-2.19 7.54-4.8 1.53-1.86 3-4.1 4.45-6.4a63.04 63.04 0 0 0 4.46 6.4C38.59 47.82 40.92 50 44 50h10v6l10-8-10-8v6H44c-.92 0-2.6-1.06-4.46-3.33a74.49 74.49 0 0 1-5.2-7.67 74.49 74.49 0 0 1 5.2-7.67C41.4 25.06 43.08 24 44 24h10v6l10-8-10-8z"></path></g></svg></span> Random Resource</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/all"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g><path d="M5 9h3V6H5zm6 0h12V6H11zm-6 6h3v-3H5zm6 0h12v-3H11zm-6 6h3v-3H5zm6 0h12v-3H11z"></path></g></svg></span> Alphabetical List</a></li > </ul></div > </div></li ><li> <button class="nav-button"> <span class="label">Task Types</span ><svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path class="arrow-down" d="M4,4l4,4l4-4" /> <path class="arrow-right" d="M6,2l4,4l-4,4" /> </svg> </button> <div class="dropdown closed"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Audio-Analysis/">Audio Analysis</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Classification/">Classification</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Data-Generation/">Data Generation</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Denoising/">Denoising</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Feature-Extraction/">Feature Extraction</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Image-Captioning/">Image Captioning</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Image-Processing/">Image Processing</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Language-Modeling/">Language Modeling</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Object-Detection/">Object Detection</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Question-Answering/">Question Answering</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Regression/">Regression</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Semantic-Segmentation/">Semantic Segmentation</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Speech-Recognition/">Speech Recognition</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Translation/">Translation</a></li > </ul> <div class="other-nav-pages"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/random"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><g><path d="M54 14v6H44c-3.08 0-5.41 2.19-7.55 4.8-1.54 1.86-3.01 4.1-4.46 6.4a63.36 63.36 0 0 0-4.45-6.4C25.4 22.18 23.08 20 20 20H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c.91 0 2.58 1.06 4.45 3.33A74.99 74.99 0 0 1 29.64 35a74.99 74.99 0 0 1-5.2 7.67C22.59 44.94 20.92 46 20 46H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c3.08 0 5.4-2.19 7.54-4.8 1.53-1.86 3-4.1 4.45-6.4a63.04 63.04 0 0 0 4.46 6.4C38.59 47.82 40.92 50 44 50h10v6l10-8-10-8v6H44c-.92 0-2.6-1.06-4.46-3.33a74.49 74.49 0 0 1-5.2-7.67 74.49 74.49 0 0 1 5.2-7.67C41.4 25.06 43.08 24 44 24h10v6l10-8-10-8z"></path></g></svg></span> Random Resource</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/all"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g><path d="M5 9h3V6H5zm6 0h12V6H11zm-6 6h3v-3H5zm6 0h12v-3H11zm-6 6h3v-3H5zm6 0h12v-3H11z"></path></g></svg></span> Alphabetical List</a></li > </ul></div > </div></li > </ul></div><div class="section learn-more-about-wl"> <ul> <li class="learn-more-about-wl-frame"> <a class="learn-more-about-wl-button" href="https://www.wolfram.com/language/" ><svg viewBox="0 0 124 31"> <path d="M15.5 1a14.5 14.5 0 1 1 0 29 14.5 14.5 0 0 1 0-29Zm0 2a12.5 12.5 0 1 0 0 25 12.5 12.5 0 0 0 0-25Zm1.8 5.4v4.3l-1.5-1.1-.3-1.5 1.8-1.7ZM5.6 20.3a11 11 0 1 1 15.7 4.5l-3.7-4.7 3 .4h2l2-2.5s-5-3-6.6-4.8a46 46 0 0 0-.2-6.6l-2.6 2.6-1.3-4a13.5 13.5 0 0 0-3.7 6c-2 2.3-3.4 6-4.6 9.1Zm13.8 5.5a11 11 0 0 1-12.6-3.6c.9-4 2-8.7 4-10.1.9-1.7 1.2-4.2 3-5.5.4 1.3 1 4 1.5 5.3 2 2.1 5.2 4.7 7.3 5.7.2.1.5 1 .5 1l-.9 1-9-.8-2.4.1c.4-1 1.4-2 1.4-2s-1-.5-1.6-.6l.8-1.1c-.2 0-2 .9-2.2 1.6l1.5.5s-1 1-1.2 2.6c0 0 3-.4 5-.1h1.3l3.6 6Zm-4-10.8c-.2.3-.3.5-.3.8.5 0 1 .1 1.6.5l1.2-.4c-.7-.5-1.5-1-2.6-.9Z" ></path> <text font-family="Source Sans Pro, system-ui, sans-serif" font-size="11" > <tspan x="36" y="11">Learn More about</tspan> <tspan x="36" y="26">Wolfram Language</tspan> </text> </svg></a > </li> </ul> </div> </div> </nav> </header> <main class="shingle-content"> <div class="wrap"> <div class="page-title"> <div class="zc_c2c" data-clipboard-text='NetModel["D2-Net Trained on MegaDepth Data"]' > <h1> D2-Net <span class="action">Trained on</span> <span class="data">MegaDepth Data</span> </h1> </div> </div> <p class="lead">Find generic keypoints and their feature vectors in an image</p> <div class="details"> <p>Released in 2019 by Mihai Dusmanu et al., this VGG-like model is able to find generic keypoints in an image and describe each keypoint with a feature vector. Such feature vectors can be used to find correspondences between different images of the same scene, mapping the movement of keypoints from one image to the other. It performs local feature extraction using a describe-and-detect methodology, jointly optimizing the detection and description objectives during training. The joint objective is to minimize the distance between the corresponding keypoints in feature space while maximizing the distance between other confounding points in either image. This objective is similar to the triplet margin ranking loss with an additional detection term.</p> </div> <p class="netsize"> Number of layers: 22 | Parameter count: 7,635,264 | Trained size: 31 MB | </p> <h2 id="training-set-info">Training Set Information</h2> <ul> <li> <a href="https://www.cs.cornell.edu/projects/megadepth/">MegaDepth</a>, consisting of 196 different locations reconstructed from COLMAP SfM/MVS with 130 thousand images. Of these 130 thousand photos, around one hundred thousand images are used for Euclidean depth data, and the remaining 30 thousand images are used to derive ordinal depth data. </li> </ul> <h2 id="training-set-info">Performance</h2> <ul> <li><p>This model achieves 74.2% accuracy for correctly localized queries with a distance threshold equal to one meter on the InLoc dataset.</p></li> </ul> <div class="col main"> <h2 id="Examples">Examples</h2> <div id="notebookButtons" class="example"> <p> <a href="https://www.wolframcloud.com/download/8449ba05-6fbc-4270-bb9b-8b12a3702664?extension=always&filename=D2-Net-Trained-on-MegaDepth-Data-1-0-0-examples" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Download Example Notebook" > <svg xmlns="http://www.w3.org/2000/svg" class="notebook-download" width="26" height="32" viewBox="0 0 26 32" role="presentation" > <path class="fill" fill="#598527" d="M3.5 0C2.3 0 1.27.86 1.04 2H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v.5C1 30.9 2.12 32 3.5 32h20c1.4 0 2.5-1.1 2.5-2.5v-27C26 1.1 24.88 0 23.5 0h-20zm0 .98h20c.85 0 1.52.67 1.52 1.5v26.03c0 .85-.67 1.52-1.5 1.52H3.48c-.85 0-1.52-.67-1.52-1.5V2.48c0-.85.67-1.52 1.5-1.52zM19.54 15.15L22 12.4l-3.6-.77.36-3.64-3.4 1.46L13.5 6.3l-1.87 3.16L8.25 8l.37 3.63L5 12.4l2.46 2.75L5 17.88l3.6.78-.36 3.65 3.4-1.47L13.5 24l1.87-3.16 3.38 1.47-.37-3.64L22 17.9zm.65 1.77l-1.66-.56-1.12-1.45 1.44.55zm-5.3 3.38l-1.02 1.73v-1.8l1.06-1.53zm-2.42-8.95l-1.75-.6-1-1.36 1.83.8zm2.96-1.16l1.84-.8-1 1.34-1.76.6zm2.23 1.58l-.9 1.25.06-1.88 1.04-1.4zM13.5 19.5l-1.36-1.95 1.36-1.83 1.36 1.83zm-2.56-5.6l-.07-2.37 2.27.8v2.32zm2.94-1.57l2.26-.8-.06 2.38-2.2.75v-2.32zm-4.55-.55l-.2-2.02 1.04 1.4.05 1.87zm3.6 3.53l-1.36 1.84-2.3-.68 1.46-1.9zm-.85 3.4l1.06 1.53v1.8l-1.02-1.73zm2-3.4l2.2-.73 1.46 1.9-2.3.67zm6.6-2.46l-1.7 1.9-2.03-.74 1.2-1.7zM13.5 7.67l1.3 2.2-1.3 1.65-1.3-1.65zm-7.18 5.17l2.52-.55 1.2 1.7-2 .74zm1.82 2.6l1.44-.53-1.12 1.46-1.65.56zM6.96 17.6l1.7-.58 1.85.53-1.53.48zm2.36 1.05l2.05-.64.05 2.17-2.36 1.02zm6.26 1.52l.05-2.16 2.05.65.26 2.54zm2.44-2.14l-1.53-.48 1.82-.53 1.72.58z" /> </svg> <span class="text" ><span class="line">Download Example </span ><span class="line">Notebook</span></span > </a> </p> <p> <a href="https://www.wolframcloud.com/env/8449ba05-6fbc-4270-bb9b-8b12a3702664?src=CloudBasicCopiedContent#sidebar=basic-notebook-links" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Open in Wolfram Cloud" > <svg xmlns="http://www.w3.org/2000/svg" class="cloud-open example" width="41" height="32" viewBox="0 0 64 50" role="presentation" > <path class="stroke" fill="none" stroke="#598527" stroke-width="2" stroke-linecap="round" d="M22 42h30c6.08 0 11-4.92 11-11 0-3.85-2.03-7.42-5.33-9.4.22-.7.33-1.4.33-2.1 0-3.87-3.13-7-7-7-.43 0-.86.04-1.3.12C48.35 5.86 42.4 1 35.5 1c-4.74 0-9.18 2.32-11.9 6.2-1.3-.45-2.7-.7-4.1-.7C12.6 6.5 7 12.1 7 19c0 .87.1 1.73.28 2.57C3.45 23.4 1 27.27 1 31.5c0 3.92 2.1 7.54 5.5 9.5" /> <path class="fill" fill="#598527" d="M22.5 19.1L45 20 28.3 35l1-5.5c-5.24 2.27-13.42 9.74-16.1 19.8l-.6-.1c0-12.6 7.6-20.76 14.5-26.3z" /> </svg> <span class="text" ><span class="line">Open in </span ><span class="line">Wolfram Cloud</span></span > </a> </p> </div> <!-- RS_SHINGLE_EXAMPLE_SECTION_START --><div class="example-notebook"><div class="subsection cell-group"><h3>Resource retrieval</h3><p class="example-text">Get the pre-trained net:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[1]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/25aeae5ffa803145.png" alt="NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;]" width="307" height="19" style="width: 19.1875em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[1]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/05fbebd0c304fbc4.png" width="430" height="369" style="width: 26.8750em; height: 23.0625em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Evaluation function</h3><p class="example-text">Write an evaluation function to post-process the net output in order to obtain keypoint position, strength and features:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[2]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/36efb7374489d86c.png" alt="Options[netevaluate] = {MaxFeatures -> 50}; netevaluate[img_Image, opts : OptionsPattern[]] := Module[ {dims, featureMap, c, h, w, transposed, normalized, strengthArray, pos, scalex, scaley, keypointStr, keypointPos, keypointFeats}, dims = ImageDimensions[img]; featureMap = NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;][img]; {c, h, w} = Dimensions[featureMap]; transposed = Transpose[featureMap, {3, 1, 2}]; normalized = transposed/Map[Norm, transposed, {2}]; (* Matrix containing the strengths of each keypoint *) strengthArray = Map[Max, normalized, {2}]; (* Find positions of (up to) MaxFeatures strongest keypoints *) pos = Ordering[ Flatten@strengthArray, -Min[OptionValue[MaxFeatures], w*h]] - 1; pos = QuotientRemainder[#, w] + {1, 1} & /@ pos; (* matrix position *) (* From array positions to image keypoint positions *) {scalex, scaley} = N[dims/{w, h}]; keypointPos = {scalex*(#[[1]] - 0.5), scaley*(h - #[[2]] + 0.5)} & /@ Reverse /@ pos; (* Extract the features and strengths *) keypointFeats = Extract[normalized, pos]; keypointStr = Extract[strengthArray, pos]; {keypointPos, keypointStr, keypointFeats} ]" width="551" height="513" style="width: 34.4375em; height: 32.0625em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div></div><div class="subsection cell-group"><h3>Basic usage</h3><p class="example-text">Obtain the keypoints of a given image:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[3]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/6230bfd041cffff3.png" alt="(* Evaluate this cell to get the example input *) CloudGet[&quot;https://www.wolframcloud.com/obj/ae785a2c-eb63-4af1-ad3c-70c6946b852b&quot;] " width="265" height="140" style="width: 16.5625em; height: 8.7500em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[4]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/3d5b11ed0f4d73bf.png" alt="{keypointPos, keypointStr, keypointFeats} = netevaluate[testImage];" width="431" height="19" style="width: 26.9375em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><p class="example-text">Visualize the keypoints:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[5]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/3ee135a930950e7c.png" alt="HighlightImage[testImage, keypointPos]" width="254" height="19" style="width: 15.8750em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[5]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/57430f94391ab3af.png" width="292" height="219" style="width: 18.2500em; height: 13.6875em;"/></div></td></tr></table></div><p class="example-text">Specify a maximum of 15 keypoints and visualize the new detection:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[6]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/5febb3d1e062f03a.png" alt="{keypointPos, keypointStr, keypointFeats} = netevaluate[testImage, MaxFeatures -> 15];" width="551" height="19" style="width: 34.4375em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[7]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/397e580d7c09449c.png" alt="HighlightImage[testImage, keypointPos]" width="254" height="19" style="width: 15.8750em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[7]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/216715ff702f3754.png" width="295" height="222" style="width: 18.4375em; height: 13.8750em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Network result</h3><p class="example-text">For the default input size of 224&Cross;224, the net divides the input image in 55&Cross;55 patches and computes a feature vector of size 512 for each patch:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[8]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/71f505fa12334b5a.png" alt="(* Evaluate this cell to get the example input *) CloudGet[&quot;https://www.wolframcloud.com/obj/085bf1db-e081-4a91-b16e-dc13c2f24cb7&quot;] " width="265" height="140" style="width: 16.5625em; height: 8.7500em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[9]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/0f6fce9b47920d56.png" alt="netResult = NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;][testImage];" width="456" height="19" style="width: 28.5000em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[10]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/05719c6dd01894fb.png" alt="Dimensions[netResult]" width="142" height="19" style="width: 8.8750em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[10]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/39fcb45c20348c5e.png" width="66" height="17" style="width: 4.1250em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Every patch is associated to a scalar strength value indicating the likelihood that the patch contains a keypoint. The strength of each patch is the maximal element of its feature vector after an L2 normalization. Obtain the strength of each patch:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[11]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/00cb70e91a83ae9e.png" alt="strengthArray = With[{transposed = Transpose[netResult, {3, 1, 2}]}, Map[Max, transposed/Map[Norm, transposed, {2}], {2}] ];" width="435" height="66" style="width: 27.1875em; height: 4.1250em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><p class="example-text">Visualize the strength of each patch as a heat map:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[12]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/1a6a9249ce477bff.png" alt="heatmap = ImageApply[{#, 1 - #, 1 - #} &, ImageAdjust@Image[strengthArray]]" width="507" height="19" style="width: 31.6875em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[12]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/7cdd4d0d008737b6.png" width="214" height="214" style="width: 13.3750em; height: 13.3750em;"/></div></td></tr></table></div><p class="example-text">Overlay the heat map on the image:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[13]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/1f5d48c4cee384ef.png" alt="overlayed = ImageCompose[ testImage, {ImageResize[heatmap, ImageDimensions@testImage], 0.5}]" width="407" height="43" style="width: 25.4375em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[13]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/10880cd0e1a7e657.png" width="322" height="242" style="width: 20.1250em; height: 15.1250em;"/></div></td></tr></table></div><p class="example-text">Keypoints are selected starting from the patch with highest strength, up to <span class="inline-cell"></span>keypoints. Highlight the top 10 keypoints:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[14]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/2f4d8797e0484a69.png" alt="{keypointPos, keypointStr, keypointFeats} = netevaluate[testImage, MaxFeatures -> 10];" width="551" height="19" style="width: 34.4375em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[15]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/6e523bc4c4a32597.png" alt="HighlightImage[overlayed, keypointPos]" width="253" height="19" style="width: 15.8125em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[15]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/2332eff563ddb4d3.png" width="296" height="223" style="width: 18.5000em; height: 13.9375em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Find correspondences between images</h3><p class="example-text">The main application of computing feature vectors for the image keypoints is to find correspondences in different images of the same scene. Get two hundred keypoint features from two images:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[16]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/3f071932657ad917.png" alt="(* Evaluate this cell to get the example input *) CloudGet[&quot;https://www.wolframcloud.com/obj/e0808678-8175-4e4d-89c9-6e3205aabbd9&quot;] " width="514" height="141" style="width: 32.1250em; height: 8.8125em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[17]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/2db59755167781ae.png" alt="{keypointPos2, keypointStr2, keypointFeats2} = netevaluate[img2, MaxFeatures -> 200];" width="549" height="19" style="width: 34.3125em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><p class="example-text">Define a function to find the <i>n</i> nearest pairs of keypoints (in feature space) and use it to find the five nearest pairs:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[18]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/368287450b15e40e.png" alt="findKeypointPairs[feats1_, feats2_, n_] := Module[ {distances, nearestPairs, nearestDistances}, distances = DistanceMatrix[feats1, feats2]; nearestPairs = MapIndexed[Flatten@{#2, Ordering[#1, 1]} &, distances]; nearestDistances = Extract[distances, nearestPairs]; nearestPairs[[Ordering[nearestDistances, n]]] ];" width="502" height="160" style="width: 31.3750em; height: 10.0000em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[19]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/5a53082b41154062.png" alt="pairs = findKeypointPairs[keypointFeats1, keypointFeats2, 5]" width="382" height="19" style="width: 23.8750em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[19]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/77ef3b4f363ffc07.png" width="271" height="17" style="width: 16.9375em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Get the keypoint positions associated with each pair and visualize them on the respective images:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[20]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/7455f4fb0fe3f65c.png" alt="{pos1, pos2} = Transpose@ Map[{keypointPos1[[First@#]], keypointPos2[[Last@#]]} &, pairs];" width="587" height="19" style="width: 36.6875em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[21]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/4c8b8f208a7a90d3.png" alt="GraphicsRow@MapThread[ Function[{img, keypoints}, Show[img, Graphics@ MapIndexed[Inset[Style[First@#2, 12, Yellow, Bold], #1] &, keypoints]] ], {{img1, img2}, {pos1, pos2}} ]" width="625" height="137" style="width: 39.0625em; height: 8.5625em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[21]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/653e7c38acec074f.png" width="530" height="193" style="width: 33.1250em; height: 12.0625em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Net information</h3><p class="example-text">Inspect the number of parameters of all arrays in the net:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[22]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/4ffd3c18ab272523.png" alt="Information[ NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;], &quot;ArraysElementCounts&quot;]" width="548" height="19" style="width: 34.2500em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[22]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/1e621f2b17369943.png" width="575" height="75" style="width: 35.9375em; height: 4.6875em;"/></div></td></tr></table></div><p class="example-text">Obtain the total number of parameters:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[23]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/1c48cbd275ec729e.png" alt="Information[ NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;], &quot;ArraysTotalElementCount&quot;]" width="574" height="19" style="width: 35.8750em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[23]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/5c57cb2c2282711e.png" width="49" height="17" style="width: 3.0625em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Obtain the layer type counts:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[24]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/508f2b21e7042b88.png" alt="Information[ NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;], &quot;LayerTypeCounts&quot;]" width="521" height="19" style="width: 32.5625em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[24]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/34d62055731940b1.png" width="380" height="17" style="width: 23.7500em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Display the summary graphic:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[25]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/219506e5e7ff2144.png" alt="Information[ NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;], &quot;SummaryGraphic&quot;]" width="521" height="19" style="width: 32.5625em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[25]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/6bf3d0228e2ec24d.png" width="855" height="40" style="width: 53.4375em; height: 2.5000em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Export to ONNX</h3><p class="example-text"><span class="inline-formula"><a class="reflink" href="https://reference.wolfram.com/language/ref/Export">Export</a></span> the net to the ONNX format:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[26]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/7dae80575399714c.png" alt="onnxFile = Export[FileNameJoin[{$TemporaryDirectory, &quot;net.onnx&quot;}], NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;]]" width="435" height="43" style="width: 27.1875em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[26]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/3419477889c46729.png" width="78" height="17" style="width: 4.8750em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Get the size of the ONNX file:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[27]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/6ec6fa83151661ea.png" alt="FileByteCount[onnxFile]" width="151" height="19" style="width: 9.4375em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[27]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/28834c083f6fdc23.png" width="55" height="17" style="width: 3.4375em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">The byte count of the resource object is similar to the ONNX file:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[28]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/7dc86a2f3e9d83db.png" alt="NetModel[&quot;D2-Net Trained on MegaDepth Data&quot;, &quot;ByteCount&quot;]" width="394" height="19" style="width: 24.6250em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[28]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/2fa41232af552010.png" width="55" height="17" style="width: 3.4375em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Check some metadata of the ONNX model:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[29]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/06ac8be825d8a805.png" alt="{OpsetVersion, IRVersion} = {Import[onnxFile, &quot;OperatorSetVersion&quot;], Import[onnxFile, &quot;IRVersion&quot;]}" width="469" height="43" style="width: 29.3125em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[29]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/052e8caa620f965d.png" width="189" height="17" style="width: 11.8125em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Import the model back into the Wolfram Language. However, the <a href="https://reference.wolfram.com/language/ref/NetEncoder.html">NetEncoder</a> and <a href="https://reference.wolfram.com/language/ref/NetDecoder.html">NetDecoder</a> will be absent because they are not supported by ONNX:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[30]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/7b38296cd4337df8.png" alt="Import[onnxFile]" width="106" height="19" style="width: 6.6250em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[30]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/ecc/ecc7ca3f-d9a8-460a-9818-8a3cb69e1951/557fdd7bf5195f61.png" width="303" height="44" style="width: 18.9375em; height: 2.7500em;"/></div></td></tr></table></div></div></div><!-- RS_SHINGLE_EXAMPLE_SECTION_END --> <div id="notebookButtons" class="construction"> <h2 id="Construction-notebook">Construction Notebook</h2> <p> <a href="https://www.wolframcloud.com/download/c7a707be-3182-4bd5-9ba0-91b1a059e948?extension=always&filename=D2-Net-Trained-on-MegaDepth-Data" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Download Construction Notebook" > <svg id="iconGroup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 34" class="notebook-download" width="26" height="32" role="presentation" > <path class="fill" fill="#598527" d="M16.67276,8.65568A1.26126,1.26126,0,1,1,15.4115,7.39442,1.26126,1.26126,0,0,1,16.67276,8.65568ZM15.4115,12.655a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,15.4115,12.655Zm0,4.99574A1.26126,1.26126,0,1,0,16.67276,18.912,1.26126,1.26126,0,0,0,15.4115,17.65072Zm0,4.99574a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,15.4115,22.64646Zm7.24962-10.2563a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,22.66112,12.39016Zm0,5.52537a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,22.66112,17.91553ZM6.83888,9.89229a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,9.89229Zm0,5.26055a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,15.15285Zm0,5.26055a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,20.4134ZM24.5,1A2.48819,2.48819,0,0,1,27,3.5v27A2.47572,2.47572,0,0,1,24.5,33H4.5A2.48819,2.48819,0,0,1,2,30.5V30H1V27H2V26H1V23H2V22H1V19H2V18H1V15H2V14H1V11H2V10H1V7H2V6H1V3H2.04A2.51946,2.51946,0,0,1,4.5,1ZM4.46,1.96a1.50243,1.50243,0,0,0-1.5,1.52V29.53a1.50243,1.50243,0,0,0,1.52,1.5H24.52a1.50243,1.50243,0,0,0,1.5-1.52V3.48a1.50243,1.50243,0,0,0-1.52-1.5H4.5Z" /> <path class="stroke" fill="none" stroke="#598527" stroke-miterlimit="10" stroke-width="0.25px" d="M7.0766,11.391l8.3349-2.51153M7.0766,16.41411l8.3349-2.51153M7.0766,21.43717l8.3349-2.51153m0,5.02306,7.0119-5.02306M15.4115,8.87952l7.0119,5.02306M7.0766,11.391l8.3349,2.51153m0,5.02306L7.0766,11.391m0,0L15.4115,23.9487M7.0766,16.41411l8.3349-7.53459M7.0766,21.43717,15.4115,8.87952M7.0766,16.41411l8.3349,2.51153m0-5.02306L7.0766,21.43717m0-5.02306,8.3349,7.53459m0-5.02306,7.0119-5.02306m-7.0119,0h7.0119m-7.0119,5.02306h7.0119M15.4115,23.9487l7.0119-10.04612M15.4115,8.87952l7.0119,10.04612m-7.0119-5.02306,7.0119,5.02306M7.0766,21.43717l8.3349,2.51153" /> </svg> <span class="text" ><span class="line">Download Construction </span ><span class="line">Notebook</span></span > </a> </p> <p> <a href="https://www.wolframcloud.com/env/c7a707be-3182-4bd5-9ba0-91b1a059e948?src=CloudBasicCopiedContent#sidebar=basic-notebook-links" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Open in Wolfram Cloud" > <svg xmlns="http://www.w3.org/2000/svg" class="cloud-open construction" width="41" height="32" viewBox="0 0 64 50" role="presentation" > <path class="stroke" fill="none" stroke="#598527" stroke-width="2" stroke-linecap="round" d="M22 42h30c6.08 0 11-4.92 11-11 0-3.85-2.03-7.42-5.33-9.4.22-.7.33-1.4.33-2.1 0-3.87-3.13-7-7-7-.43 0-.86.04-1.3.12C48.35 5.86 42.4 1 35.5 1c-4.74 0-9.18 2.32-11.9 6.2-1.3-.45-2.7-.7-4.1-.7C12.6 6.5 7 12.1 7 19c0 .87.1 1.73.28 2.57C3.45 23.4 1 27.27 1 31.5c0 3.92 2.1 7.54 5.5 9.5" /> <path class="fill" fill="#598527" d="M22.5 19.1L45 20 28.3 35l1-5.5c-5.24 2.27-13.42 9.74-16.1 19.8l-.6-.1c0-12.6 7.6-20.76 14.5-26.3z" /> </svg> <span class="text" ><span class="line">Open in </span ><span class="line">Wolfram Cloud</span></span > </a> </p> </div> <h2 id="Resource-History">Resource History</h2> <ul class="source-metadata"> <li> Date Created: <span class="property">22 September 2021</span> </li> </ul> <h2 id="Reference">Reference</h2> <ul class="reference"> <li> <span> M. Dusmanu, I. Rocco, T. Pajdla, M. Pollefeys, J. Sivic, A. Torii, T. Sattler, "D2-Net: A Trainable CNN for Joint Detection and Description of Local Features," arXiv:1905.03561 (2019) </span> </li> </span></li> <li><span>Available from: <a href="https://github.com/mihaidusmanu/d2-net" target="_blank">https://github.com/mihaidusmanu/d2-net</a></span></li> <li> <span>Rights: <a href="https://github.com/mihaidusmanu/d2-net/blob/master/LICENSE" target="_blank">D2-net BSD license</a> </span> </li> </ul> <footer id="bottom"> <ul> <li> <a href="https://resources.wolframcloud.com/NeuralNetRepository/contact-us" class="contact"> <svg viewBox="0 0 44 32"> <path d="M19 .5A6.5 6.5 0 0 0 12.5 7v4.5H.46l12.04 8.75V25a6.5 6.5 0 0 0 6.5 6.5h18a6.5 6.5 0 0 0 6.5-6.5V7A6.5 6.5 0 0 0 37 .5zm0 1h18A5.5 5.5 0 0 1 42.5 7v18a5.5 5.5 0 0 1-5.5 5.5H19a5.5 5.5 0 0 1-5.5-5.5v-5.25L3.54 12.5h9.96V7A5.5 5.5 0 0 1 19 1.5z" /> <path d="M18 6h20v4H18zM18 14h20v4H18zM18 22h10v4H18z" /></svg ><span class="text">Give Feedback</span> </a> </li> <li> <a href="#top" class="top"> <svg viewBox="0 0 16 16"> <path d="M4 0C1.784 0 0 1.784 0 4v8c0 2.216 1.784 4 4 4h8c2.216 0 4-1.784 4-4V4c0-2.216-1.784-4-4-4H4zm4 3l4 4-1 1-3-3-3 3-1-1 4-4zm0 5l4 4-1 1-3-3-3 3-1-1 4-4z" /></svg ><span class="text">Top</span> </a> </li> </ul> </footer> </div> </div> </main> <footer id="gws-footer"> <div class="wrap"> <p> &copy; 2025 <a href="https://www.wolfram.com/" target="gws-footer">Wolfram</a>. All rights reserved. </p> <ul> <li> <a href="https://www.wolfram.com/legal/terms/wolfram-cloud.html" target="gws-footer" > Legal </a> &amp; <a href="https://www.wolfram.com/legal/privacy/wolfram-cloud.html" target="gws-footer" > Privacy Policy </a> </li> <li> <a href="https://resources.wolframcloud.com/forms/contact" target="gws-footer" > Contact Us </a> </li> <li> <a href="https://www.wolframalpha.com/" target="gws-footer"> WolframAlpha.com </a> </li> <li> <a href="https://www.wolframcloud.com/" target="gws-footer"> WolframCloud.com </a> </li> </ul> </div> </footer> <script src="https://www.wolframcdn.com/javascript/jquery-2.1.4.min.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/react-autocomplete.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/main.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-libraries.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/results-list.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-controller.js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10