|
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
| 2 | +<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" |
| 3 | + "JATS-publishing1.dtd"> |
| 4 | +<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other"> |
| 5 | +<front> |
| 6 | +<journal-meta> |
| 7 | +<journal-id></journal-id> |
| 8 | +<journal-title-group> |
| 9 | +<journal-title>Journal of Open Source Software</journal-title> |
| 10 | +<abbrev-journal-title>JOSS</abbrev-journal-title> |
| 11 | +</journal-title-group> |
| 12 | +<issn publication-format="electronic">2475-9066</issn> |
| 13 | +<publisher> |
| 14 | +<publisher-name>Open Journals</publisher-name> |
| 15 | +</publisher> |
| 16 | +</journal-meta> |
| 17 | +<article-meta> |
| 18 | +<article-id pub-id-type="publisher-id">0</article-id> |
| 19 | +<article-id pub-id-type="doi">N/A</article-id> |
| 20 | +<title-group> |
| 21 | +<article-title>PyCPD: Pure NumPy Implementation of the Coherent Point |
| 22 | +Drift Algorithm</article-title> |
| 23 | +</title-group> |
| 24 | +<contrib-group> |
| 25 | +<contrib contrib-type="author"> |
| 26 | +<contrib-id contrib-id-type="orcid">0000-0001-6717-8979</contrib-id> |
| 27 | +<name> |
| 28 | +<surname>Gatti</surname> |
| 29 | +<given-names>Anthony A.</given-names> |
| 30 | +</name> |
| 31 | +<xref ref-type="aff" rid="aff-1"/> |
| 32 | +<xref ref-type="aff" rid="aff-2"/> |
| 33 | +</contrib> |
| 34 | +<contrib contrib-type="author"> |
| 35 | +<name> |
| 36 | +<surname>Khallaghi</surname> |
| 37 | +<given-names>Siavash</given-names> |
| 38 | +</name> |
| 39 | +<xref ref-type="aff" rid="aff-3"/> |
| 40 | +<xref ref-type="corresp" rid="cor-1"><sup>*</sup></xref> |
| 41 | +</contrib> |
| 42 | +<aff id="aff-1"> |
| 43 | +<institution-wrap> |
| 44 | +<institution>Stanford University, USA</institution> |
| 45 | +</institution-wrap> |
| 46 | +</aff> |
| 47 | +<aff id="aff-2"> |
| 48 | +<institution-wrap> |
| 49 | +<institution>NeuralSeg Ltd., Canada</institution> |
| 50 | +</institution-wrap> |
| 51 | +</aff> |
| 52 | +<aff id="aff-3"> |
| 53 | +<institution-wrap> |
| 54 | +<institution>Independent Researcher, Canada</institution> |
| 55 | +</institution-wrap> |
| 56 | +</aff> |
| 57 | +</contrib-group> |
| 58 | +<author-notes> |
| 59 | +<corresp id="cor-1">* E-mail: <email></email></corresp> |
| 60 | +</author-notes> |
| 61 | +<volume>¿VOL?</volume> |
| 62 | +<issue>¿ISSUE?</issue> |
| 63 | +<fpage>¿PAGE?</fpage> |
| 64 | +<permissions> |
| 65 | +<copyright-statement>Authors of papers retain copyright and release the |
| 66 | +work under a Creative Commons Attribution 4.0 International License (CC |
| 67 | +BY 4.0)</copyright-statement> |
| 68 | +<copyright-year>2022</copyright-year> |
| 69 | +<copyright-holder>The article authors</copyright-holder> |
| 70 | +<license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"> |
| 71 | +<license-p>Authors of papers retain copyright and release the work under |
| 72 | +a Creative Commons Attribution 4.0 International License (CC BY |
| 73 | +4.0)</license-p> |
| 74 | +</license> |
| 75 | +</permissions> |
| 76 | +<kwd-group kwd-group-type="author"> |
| 77 | +<kwd>Python</kwd> |
| 78 | +<kwd>Point-cloud</kwd> |
| 79 | +<kwd>Registration</kwd> |
| 80 | +<kwd>Expectation-Maximization</kwd> |
| 81 | +</kwd-group> |
| 82 | +</article-meta> |
| 83 | +</front> |
| 84 | +<body> |
| 85 | +<sec id="background"> |
| 86 | + <title>Background</title> |
| 87 | + <p>Point cloud registration is a common problem in many areas of |
| 88 | + computer science, particularly computer vision. Point clouds come from |
| 89 | + many types of data such as LIDAR commonly used for self-driving |
| 90 | + vehicles, and other sorts of 3D scanners (e.g., structured light) are |
| 91 | + commonly used to map the surface of physical objects. Point clouds are |
| 92 | + also used to represent the surface of an anatomical structure |
| 93 | + extracted from a medical image. Point cloud registration finds a |
| 94 | + transformaton from one point cloud to another. Point cloud |
| 95 | + registration has use cases in many fields from self-driving vehicles |
| 96 | + to medical imaging and virtual reality. Typically, point cloud |
| 97 | + registraton is classified into rigid (only rotations or translations), |
| 98 | + affine (rigid + shearing and scaling) and non-rigid also called |
| 99 | + deformable registration (non-linear deformation).</p> |
| 100 | + <p>Point cloud registration typically requires 2 point clouds. The |
| 101 | + first point cloud is the “fixed” or “target” point cloud and the |
| 102 | + second is the “moving” or “source” point cloud. We try to find the |
| 103 | + transformation that will best align the moving (or source) point cloud |
| 104 | + with the fixed point cloud. One of the most well known rigid point |
| 105 | + cloud registration algorithms is the Iterative Closest Point (ICP) |
| 106 | + algorithm |
| 107 | + (<xref alt="Besl & McKay, 1992" rid="ref-121791" ref-type="bibr">Besl |
| 108 | + & McKay, 1992</xref>; |
| 109 | + <xref alt="Chen & Medioni, 1992" rid="ref-CHEN1992145" ref-type="bibr">Chen |
| 110 | + & Medioni, 1992</xref>). ICP is an iterative algorithm where the |
| 111 | + following steps are iterated: i) for every point on the moving point |
| 112 | + cloud find the closes point on the fixed point cloud ii) use a least |
| 113 | + squares approach to find the optimal transformation matrix (rotation, |
| 114 | + tranlsation, scaling, shear) to align the point correspondences found |
| 115 | + in i) iii) apply the transformation from ii) to the moving point cloud |
| 116 | + These steps are repeated until the root mean squared point-to-point |
| 117 | + distances from i) converges.</p> |
| 118 | + <p>The coherent point drift (CPD) algorithm was created by Myronenko |
| 119 | + and Song |
| 120 | + (<xref alt="Myronenko & Song, 2010" rid="ref-5432191" ref-type="bibr">Myronenko |
| 121 | + & Song, 2010</xref>) to overcome many of the limitaitons of ICP |
| 122 | + and other previous registration methods. Namely, these other methods |
| 123 | + didnt necessarily generalize to greater than 3 dimensions and they |
| 124 | + were prone to errors such as noise, outliers, or missing points. The |
| 125 | + CPD alogirthm is a probabilistic multidimensional algorithm that is |
| 126 | + robust and works for both rigid and non-rigid registration. In CPD the |
| 127 | + moving point cloud is modelled as a Gaussian Mixture Model (GMM) and |
| 128 | + the fixed point cloud is treated as observations from the GMM. The |
| 129 | + optimal transformation parameters maximze the Maximum Likelihood / |
| 130 | + Maximum A Posteriori (MAP) estimation that the observed point cloud is |
| 131 | + drawn from the GMM. A key point of the CPD algorithm is that it forces |
| 132 | + the points to move coherently by preserving topological structure. The |
| 133 | + CPD algorithm is also an iterative algorithm that iterates between an |
| 134 | + expectation (E) step and a maximization (M) step until convergence is |
| 135 | + achieved. The E-step estimates the posterior probability distributions |
| 136 | + of the GMM centroids (moving points) given the data (fixed points) |
| 137 | + then the M-step updates the transfomration to maximize the posterior |
| 138 | + probability that the data belong to the GMM distributions. The E- and |
| 139 | + M-steps are iterated until convergence.</p> |
| 140 | +</sec> |
| 141 | +<sec id="statement-of-need"> |
| 142 | + <title>Statement of need</title> |
| 143 | + <p>Due to the robustness and the broad array of uses for the CPD |
| 144 | + algorithm the original CPD paper has currently (March 2022) been |
| 145 | + referenced >2000 times. The CPD algorithm is available in Matlab. |
| 146 | + However, no open-source python version previously existed. In this |
| 147 | + paper we present a pure |
| 148 | + NumPy(<xref alt="Harris et al., 2020" rid="ref-harris2020array" ref-type="bibr">Harris |
| 149 | + et al., 2020</xref>) version of the CPD algorithm to enable general |
| 150 | + use of CPD for the Python community. Furthermore, the full |
| 151 | + implementation in Numpy makes the algorithm accesible for others to |
| 152 | + learn from. To help in learning, a blog post that coincides with this |
| 153 | + library has previously been |
| 154 | + <ext-link ext-link-type="uri" xlink:href="http://siavashk.github.io/2017/05/14/coherent-point-drift/">published</ext-link> |
| 155 | + (<xref alt="Khallaghi, 2017" rid="ref-khallaghi_2017" ref-type="bibr">Khallaghi, |
| 156 | + 2017</xref>).</p> |
| 157 | +</sec> |
| 158 | +<sec id="summary"> |
| 159 | + <title>Summary</title> |
| 160 | + <p>The PyCPD package implements the CPD algorithm in NumPy. The |
| 161 | + library itself includes a module to implement the Expectation |
| 162 | + Maximization (EM) algorithm. Sub-modules inherent the EM functionality |
| 163 | + and implement rigid, affine, and deformable registration using EM. CPD |
| 164 | + registration using affine, rigid, and deformable methods all allow for |
| 165 | + the transformation learned from CPD to be applied to any point cloud. |
| 166 | + Thus, it is possible to learn the transformation on a subset of the |
| 167 | + points and then apply it to the whole point cloud to reduce |
| 168 | + computation time. Finally, the low-rank approximation for deformable |
| 169 | + registration that was described by Myronenko and Song |
| 170 | + (<xref alt="Myronenko & Song, 2010" rid="ref-5432191" ref-type="bibr">Myronenko |
| 171 | + & Song, 2010</xref>) was implemented. A low rank approximation of |
| 172 | + the Gaussian kernal is used to reduce computation time and has the |
| 173 | + added benefit of regularizing the non-rigid deformation.</p> |
| 174 | + <fig> |
| 175 | + <caption><p>Visualization of the 3D rigid registration from the |
| 176 | + examples. Each panel represents a different iteration in the |
| 177 | + registraiton process. |
| 178 | + <styled-content id="figU003A1"></styled-content></p></caption> |
| 179 | + <graphic mimetype="image" mime-subtype="tiff" xlink:href="../images/rigid_bunny/rigid_bunny_3d_registration.tiff" xlink:title="" /> |
| 180 | + </fig> |
| 181 | + <p>Examples of the PyCPD algorithm are included |
| 182 | + <xref alt="Figure 1" rid="figU003A1">Figure 1</xref>. Examples are |
| 183 | + available for 2D and 3D versions of all registration methods (rigid, |
| 184 | + affine, deformable). Examples of how to use the low-rank approximation |
| 185 | + as well as how to use a sub-set of the points for registraton are also |
| 186 | + included in the examples.</p> |
| 187 | +</sec> |
| 188 | +<sec id="acknowledgements"> |
| 189 | + <title>Acknowledgements</title> |
| 190 | + <p>We acknowledge contributions from: - Alvin Wan for testing on |
| 191 | + Python 3.x. - Talley Lambert for pointing out that the moving point |
| 192 | + cloud should be immutable during registration, - Matthew DiFranco for |
| 193 | + fixing the check for target point clouds. - normanius for pointing out |
| 194 | + that the contribution of uniform distribution was not being added in |
| 195 | + the E-step. - Kai Zhang for finding a bug when transforming a point |
| 196 | + cloud using rigid registration parameters. - sandyhsia for finding a |
| 197 | + bug when updating the variance during deformable registration.</p> |
| 198 | +</sec> |
| 199 | +</body> |
| 200 | +<back> |
| 201 | +<ref-list> |
| 202 | + <ref-list> |
| 203 | + <ref id="ref-121791"> |
| 204 | + <element-citation publication-type="article-journal"> |
| 205 | + <person-group person-group-type="author"> |
| 206 | + <name><surname>Besl</surname><given-names>P. J.</given-names></name> |
| 207 | + <name><surname>McKay</surname><given-names>Neil D.</given-names></name> |
| 208 | + </person-group> |
| 209 | + <article-title>A method for registration of 3-d shapes</article-title> |
| 210 | + <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source> |
| 211 | + <year iso-8601-date="1992">1992</year> |
| 212 | + <volume>14</volume> |
| 213 | + <issue>2</issue> |
| 214 | + <pub-id pub-id-type="doi">10.1109/34.121791</pub-id> |
| 215 | + </element-citation> |
| 216 | + </ref> |
| 217 | + <ref id="ref-CHEN1992145"> |
| 218 | + <element-citation publication-type="article-journal"> |
| 219 | + <person-group person-group-type="author"> |
| 220 | + <name><surname>Chen</surname><given-names>Yang</given-names></name> |
| 221 | + <name><surname>Medioni</surname><given-names>Gérard</given-names></name> |
| 222 | + </person-group> |
| 223 | + <article-title>Object modelling by registration of multiple range images</article-title> |
| 224 | + <source>Image and Vision Computing</source> |
| 225 | + <year iso-8601-date="1992">1992</year> |
| 226 | + <volume>10</volume> |
| 227 | + <issue>3</issue> |
| 228 | + <issn>0262-8856</issn> |
| 229 | + <uri>https://www.sciencedirect.com/science/article/pii/026288569290066C</uri> |
| 230 | + <pub-id pub-id-type="doi">https://doi.org/10.1016/0262-8856(92)90066-C</pub-id> |
| 231 | + </element-citation> |
| 232 | + </ref> |
| 233 | + <ref id="ref-5432191"> |
| 234 | + <element-citation publication-type="article-journal"> |
| 235 | + <person-group person-group-type="author"> |
| 236 | + <name><surname>Myronenko</surname><given-names>Andriy</given-names></name> |
| 237 | + <name><surname>Song</surname><given-names>Xubo</given-names></name> |
| 238 | + </person-group> |
| 239 | + <article-title>Point set registration: Coherent point drift</article-title> |
| 240 | + <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source> |
| 241 | + <year iso-8601-date="2010">2010</year> |
| 242 | + <volume>32</volume> |
| 243 | + <issue>12</issue> |
| 244 | + <pub-id pub-id-type="doi">10.1109/TPAMI.2010.46</pub-id> |
| 245 | + </element-citation> |
| 246 | + </ref> |
| 247 | + <ref id="ref-harris2020array"> |
| 248 | + <element-citation publication-type="article-journal"> |
| 249 | + <person-group person-group-type="author"> |
| 250 | + <name><surname>Harris</surname><given-names>Charles R.</given-names></name> |
| 251 | + <name><surname>Millman</surname><given-names>K. Jarrod</given-names></name> |
| 252 | + <name><surname>Walt</surname><given-names>Stéfan J. van der</given-names></name> |
| 253 | + <name><surname>Gommers</surname><given-names>Ralf</given-names></name> |
| 254 | + <name><surname>Virtanen</surname><given-names>Pauli</given-names></name> |
| 255 | + <name><surname>Cournapeau</surname><given-names>David</given-names></name> |
| 256 | + <name><surname>Wieser</surname><given-names>Eric</given-names></name> |
| 257 | + <name><surname>Taylor</surname><given-names>Julian</given-names></name> |
| 258 | + <name><surname>Berg</surname><given-names>Sebastian</given-names></name> |
| 259 | + <name><surname>Smith</surname><given-names>Nathaniel J.</given-names></name> |
| 260 | + <name><surname>Kern</surname><given-names>Robert</given-names></name> |
| 261 | + <name><surname>Picus</surname><given-names>Matti</given-names></name> |
| 262 | + <name><surname>Hoyer</surname><given-names>Stephan</given-names></name> |
| 263 | + <name><surname>Kerkwijk</surname><given-names>Marten H. van</given-names></name> |
| 264 | + <name><surname>Brett</surname><given-names>Matthew</given-names></name> |
| 265 | + <name><surname>Haldane</surname><given-names>Allan</given-names></name> |
| 266 | + <name><surname>Río</surname><given-names>Jaime Fernández del</given-names></name> |
| 267 | + <name><surname>Wiebe</surname><given-names>Mark</given-names></name> |
| 268 | + <name><surname>Peterson</surname><given-names>Pearu</given-names></name> |
| 269 | + <name><surname>Gérard-Marchant</surname><given-names>Pierre</given-names></name> |
| 270 | + <name><surname>Sheppard</surname><given-names>Kevin</given-names></name> |
| 271 | + <name><surname>Reddy</surname><given-names>Tyler</given-names></name> |
| 272 | + <name><surname>Weckesser</surname><given-names>Warren</given-names></name> |
| 273 | + <name><surname>Abbasi</surname><given-names>Hameer</given-names></name> |
| 274 | + <name><surname>Gohlke</surname><given-names>Christoph</given-names></name> |
| 275 | + <name><surname>Oliphant</surname><given-names>Travis E.</given-names></name> |
| 276 | + </person-group> |
| 277 | + <article-title>Array programming with NumPy</article-title> |
| 278 | + <source>Nature</source> |
| 279 | + <publisher-name>Springer Science; Business Media LLC</publisher-name> |
| 280 | + <year iso-8601-date="2020-09">2020</year><month>09</month> |
| 281 | + <volume>585</volume> |
| 282 | + <issue>7825</issue> |
| 283 | + <uri>https://doi.org/10.1038/s41586-020-2649-2</uri> |
| 284 | + <pub-id pub-id-type="doi">10.1038/s41586-020-2649-2</pub-id> |
| 285 | + </element-citation> |
| 286 | + </ref> |
| 287 | + <ref id="ref-khallaghi_2017"> |
| 288 | + <element-citation> |
| 289 | + <person-group person-group-type="author"> |
| 290 | + <name><surname>Khallaghi</surname><given-names>Siavash</given-names></name> |
| 291 | + </person-group> |
| 292 | + <article-title>PyCPD: Tutorial on the coherent point drift algorithm</article-title> |
| 293 | + <year iso-8601-date="2017-05">2017</year><month>05</month> |
| 294 | + <uri>http://siavashk.github.io/2017/05/14/coherent-point-drift/</uri> |
| 295 | + </element-citation> |
| 296 | + </ref> |
| 297 | + </ref-list> |
| 298 | +</ref-list> |
| 299 | +</back> |
| 300 | +</article> |
0 commit comments