Skip to content

Commit

Permalink
Deployed 19d0043 to main with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 23, 2024
1 parent 8623595 commit 69ce110
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 16 deletions.
122 changes: 107 additions & 15 deletions main/reference/core/models/transforms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2691,6 +2691,35 @@ <h2 id="eva.models.transforms.ExtractCLSFeatures" class="doc doc-heading">
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>num_register_tokens</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>The number of register tokens in the model output.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>include_patch_tokens</code></td>
<td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p>Whether to concat the mean aggregated patch tokens with
the cls token.</p>
</div>
</td>
<td>
<code>False</code>
</td>
</tr>
</tbody>
</table>

Expand All @@ -2702,13 +2731,27 @@ <h2 id="eva.models.transforms.ExtractCLSFeatures" class="doc doc-heading">
<span class="normal"><a href="#__codelineno-0-13">13</a></span>
<span class="normal"><a href="#__codelineno-0-14">14</a></span>
<span class="normal"><a href="#__codelineno-0-15">15</a></span>
<span class="normal"><a href="#__codelineno-0-16">16</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cls_index</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Initializes the transformation.</span>
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12"></a>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="sd"> Args:</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14"></a><span class="sd"> cls_index: The index of the CLS token in the output tensor.</span>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_cls_index</span> <span class="o">=</span> <span class="n">cls_index</span>
<span class="normal"><a href="#__codelineno-0-16">16</a></span>
<span class="normal"><a href="#__codelineno-0-17">17</a></span>
<span class="normal"><a href="#__codelineno-0-18">18</a></span>
<span class="normal"><a href="#__codelineno-0-19">19</a></span>
<span class="normal"><a href="#__codelineno-0-20">20</a></span>
<span class="normal"><a href="#__codelineno-0-21">21</a></span>
<span class="normal"><a href="#__codelineno-0-22">22</a></span>
<span class="normal"><a href="#__codelineno-0-23">23</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11"></a> <span class="bp">self</span><span class="p">,</span> <span class="n">cls_index</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">num_register_tokens</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">include_patch_tokens</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Initializes the transformation.</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14"></a>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15"></a><span class="sd"> Args:</span>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16"></a><span class="sd"> cls_index: The index of the CLS token in the output tensor.</span>
</span><span id="__span-0-17"><a id="__codelineno-0-17" name="__codelineno-0-17"></a><span class="sd"> num_register_tokens: The number of register tokens in the model output.</span>
</span><span id="__span-0-18"><a id="__codelineno-0-18" name="__codelineno-0-18"></a><span class="sd"> include_patch_tokens: Whether to concat the mean aggregated patch tokens with</span>
</span><span id="__span-0-19"><a id="__codelineno-0-19" name="__codelineno-0-19"></a><span class="sd"> the cls token.</span>
</span><span id="__span-0-20"><a id="__codelineno-0-20" name="__codelineno-0-20"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-21"><a id="__codelineno-0-21" name="__codelineno-0-21"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_cls_index</span> <span class="o">=</span> <span class="n">cls_index</span>
</span><span id="__span-0-22"><a id="__codelineno-0-22" name="__codelineno-0-22"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_num_register_tokens</span> <span class="o">=</span> <span class="n">num_register_tokens</span>
</span><span id="__span-0-23"><a id="__codelineno-0-23" name="__codelineno-0-23"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_include_patch_tokens</span> <span class="o">=</span> <span class="n">include_patch_tokens</span>
</span></code></pre></div></td></tr></table></div>
</details>

Expand Down Expand Up @@ -2760,6 +2803,35 @@ <h2 id="eva.models.transforms.ExtractPatchFeatures" class="doc doc-heading">
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>has_cls_token</code></td>
<td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p>If set to <code>True</code>, the model output is expected to have
a classification token.</p>
</div>
</td>
<td>
<code>True</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>num_register_tokens</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>The number of register tokens in the model output.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>ignore_remaining_dims</code></td>
<td>
Expand Down Expand Up @@ -2787,14 +2859,34 @@ <h2 id="eva.models.transforms.ExtractPatchFeatures" class="doc doc-heading">
<span class="normal"><a href="#__codelineno-0-17">17</a></span>
<span class="normal"><a href="#__codelineno-0-18">18</a></span>
<span class="normal"><a href="#__codelineno-0-19">19</a></span>
<span class="normal"><a href="#__codelineno-0-20">20</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ignore_remaining_dims</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Initializes the transformation.</span>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15"></a>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16"></a><span class="sd"> Args:</span>
</span><span id="__span-0-17"><a id="__codelineno-0-17" name="__codelineno-0-17"></a><span class="sd"> ignore_remaining_dims: If set to `True`, ignore the remaining dimensions</span>
</span><span id="__span-0-18"><a id="__codelineno-0-18" name="__codelineno-0-18"></a><span class="sd"> of the patch grid if it is not a square number.</span>
</span><span id="__span-0-19"><a id="__codelineno-0-19" name="__codelineno-0-19"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-20"><a id="__codelineno-0-20" name="__codelineno-0-20"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_ignore_remaining_dims</span> <span class="o">=</span> <span class="n">ignore_remaining_dims</span>
<span class="normal"><a href="#__codelineno-0-20">20</a></span>
<span class="normal"><a href="#__codelineno-0-21">21</a></span>
<span class="normal"><a href="#__codelineno-0-22">22</a></span>
<span class="normal"><a href="#__codelineno-0-23">23</a></span>
<span class="normal"><a href="#__codelineno-0-24">24</a></span>
<span class="normal"><a href="#__codelineno-0-25">25</a></span>
<span class="normal"><a href="#__codelineno-0-26">26</a></span>
<span class="normal"><a href="#__codelineno-0-27">27</a></span>
<span class="normal"><a href="#__codelineno-0-28">28</a></span>
<span class="normal"><a href="#__codelineno-0-29">29</a></span>
<span class="normal"><a href="#__codelineno-0-30">30</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14"></a> <span class="bp">self</span><span class="p">,</span>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15"></a> <span class="n">has_cls_token</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16"></a> <span class="n">num_register_tokens</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
</span><span id="__span-0-17"><a id="__codelineno-0-17" name="__codelineno-0-17"></a> <span class="n">ignore_remaining_dims</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-18"><a id="__codelineno-0-18" name="__codelineno-0-18"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-19"><a id="__codelineno-0-19" name="__codelineno-0-19"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Initializes the transformation.</span>
</span><span id="__span-0-20"><a id="__codelineno-0-20" name="__codelineno-0-20"></a>
</span><span id="__span-0-21"><a id="__codelineno-0-21" name="__codelineno-0-21"></a><span class="sd"> Args:</span>
</span><span id="__span-0-22"><a id="__codelineno-0-22" name="__codelineno-0-22"></a><span class="sd"> has_cls_token: If set to `True`, the model output is expected to have</span>
</span><span id="__span-0-23"><a id="__codelineno-0-23" name="__codelineno-0-23"></a><span class="sd"> a classification token.</span>
</span><span id="__span-0-24"><a id="__codelineno-0-24" name="__codelineno-0-24"></a><span class="sd"> num_register_tokens: The number of register tokens in the model output.</span>
</span><span id="__span-0-25"><a id="__codelineno-0-25" name="__codelineno-0-25"></a><span class="sd"> ignore_remaining_dims: If set to `True`, ignore the remaining dimensions</span>
</span><span id="__span-0-26"><a id="__codelineno-0-26" name="__codelineno-0-26"></a><span class="sd"> of the patch grid if it is not a square number.</span>
</span><span id="__span-0-27"><a id="__codelineno-0-27" name="__codelineno-0-27"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-28"><a id="__codelineno-0-28" name="__codelineno-0-28"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_has_cls_token</span> <span class="o">=</span> <span class="n">has_cls_token</span>
</span><span id="__span-0-29"><a id="__codelineno-0-29" name="__codelineno-0-29"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_num_register_tokens</span> <span class="o">=</span> <span class="n">num_register_tokens</span>
</span><span id="__span-0-30"><a id="__codelineno-0-30" name="__codelineno-0-30"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_ignore_remaining_dims</span> <span class="o">=</span> <span class="n">ignore_remaining_dims</span>
</span></code></pre></div></td></tr></table></div>
</details>

Expand Down
2 changes: 1 addition & 1 deletion main/search/search_index.json

Large diffs are not rendered by default.

Binary file modified main/sitemap.xml.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions main/user-guide/advanced/replicate_evaluations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,16 @@ <h3 id="hibou-l-histai-dinov2-vit-l14-1m-slides-7">hibou-L (hist.ai) - DINOv2 Vi
</span><span id="__span-14-4"><a id="__codelineno-14-4" name="__codelineno-14-4" href="#__codelineno-14-4"></a>IN_FEATURES=1024 \
</span><span id="__span-14-5"><a id="__codelineno-14-5" name="__codelineno-14-5" href="#__codelineno-14-5"></a>eva predict_fit --config configs/vision/pathology/offline/&lt;task&gt;.yaml
</span></code></pre></div>
<h3 id="virchow2-paigeai-dinov2-vit-h14-31m-slides-8">Virchow2 (paige.ai) - DINOv2 ViT-H14 (3.1M Slides) <a href="#references">[8]</a></h3>
<p>To evaluate <a href="https://www.paige.ai/">paige.ai's</a> FM with DINOv2 ViT-H14 backbone, pretrained on
a proprietary dataset of 3.1M million slides, available for download on
<a href="https://huggingface.co/paige-ai/Virchow2">HuggingFace</a>, run:</p>
<div class="language-text highlight"><pre><span></span><code><span id="__span-15-1"><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>MODEL_NAME=paige/virchow2 \
</span><span id="__span-15-2"><a id="__codelineno-15-2" name="__codelineno-15-2" href="#__codelineno-15-2"></a>NORMALIZE_MEAN=&quot;[0.485,0.456,0.406]&quot; \
</span><span id="__span-15-3"><a id="__codelineno-15-3" name="__codelineno-15-3" href="#__codelineno-15-3"></a>NORMALIZE_STD=&quot;[0.229,0.224,0.225]&quot; \
</span><span id="__span-15-4"><a id="__codelineno-15-4" name="__codelineno-15-4" href="#__codelineno-15-4"></a>IN_FEATURES=1280 \
</span><span id="__span-15-5"><a id="__codelineno-15-5" name="__codelineno-15-5" href="#__codelineno-15-5"></a>eva predict_fit --config configs/vision/pathology/offline/&lt;task&gt;.yaml
</span></code></pre></div>
<h2 id="references">References</h2>
<p>[1]: Kang, Mingu, et al. "Benchmarking self-supervised learning on diverse pathology datasets." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.</p>
<p>[2]: Filiot, Alexandre, et al. "Scaling self-supervised learning for histopathology with masked image modeling." medRxiv (2023): 2023-07.</p>
Expand All @@ -2796,6 +2806,7 @@ <h2 id="references">References</h2>
<p>[5]: Saillard, et al. "H-optimus-0" https://github.com/bioptimus/releases/tree/main/models/h-optimus/v0 (2024).</p>
<p>[6]: Xu, Hanwen, et al. "A whole-slide foundation model for digital pathology from real-world data." Nature (2024): 1-8.</p>
<p>[7]: Nechaev, Dmitry, Alexey Pchelnikov, and Ekaterina Ivanova. "Hibou: A Family of Foundational Vision Transformers for Pathology." arXiv preprint arXiv:2406.05074 (2024).</p>
<p>[8]: Zimmermann, Eric, et al. "Virchow 2: Scaling Self-Supervised Mixed Magnification Models in Pathology." arXiv preprint arXiv:2408.00738 (2024).</p>



Expand Down

0 comments on commit 69ce110

Please sign in to comment.