Skip to content

Commit

Permalink
Deploying to gh-pages from @ a3d2683 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Jan 6, 2025
1 parent 2f19e2f commit ad2d56a
Show file tree
Hide file tree
Showing 1,262 changed files with 24,190 additions and 23,970 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7d20f70c4164b534d00ead21f34aefbc
config: d74ce6422f114c79684505efde6fb18f
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/environment.pickle
Binary file not shown.
26 changes: 13 additions & 13 deletions _modules/doctr/datasets/cord.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="shortcut icon" href="../../../_static/favicon.ico"/><!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 -->
<title>doctr.datasets.cord - docTR documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=649a27d8" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=d75fae25" />
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/mindee.css?v=75ddc721" />
Expand Down Expand Up @@ -297,23 +297,23 @@ <h1>Source code for doctr.datasets.cord</h1><div class="highlight"><pre>
<span class="c1"># This program is licensed under the Apache License 2.0.</span>
<span class="c1"># See LICENSE or go to &lt;https://opensource.org/licenses/Apache-2.0&gt; for full license details.</span>

<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">json</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">pathlib</span><span class="w"> </span><span class="kn">import</span> <span class="n">Path</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">typing</span><span class="w"> </span><span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">np</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">tqdm</span><span class="w"> </span><span class="kn">import</span> <span class="n">tqdm</span>

<span class="kn">from</span> <span class="nn">.datasets</span> <span class="kn">import</span> <span class="n">VisionDataset</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">convert_target_to_relative</span><span class="p">,</span> <span class="n">crop_bboxes_from_image</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">.datasets</span><span class="w"> </span><span class="kn">import</span> <span class="n">VisionDataset</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">.utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">convert_target_to_relative</span><span class="p">,</span> <span class="n">crop_bboxes_from_image</span>

<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;CORD&quot;</span><span class="p">]</span>


<div class="viewcode-block" id="CORD">
<a class="viewcode-back" href="../../../modules/datasets.html#doctr.datasets.CORD">[docs]</a>
<span class="k">class</span> <span class="nc">CORD</span><span class="p">(</span><span class="n">VisionDataset</span><span class="p">):</span>
<span class="k">class</span><span class="w"> </span><span class="nc">CORD</span><span class="p">(</span><span class="n">VisionDataset</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;CORD dataset from `&quot;CORD: A Consolidated Receipt Dataset forPost-OCR Parsing&quot;</span>
<span class="sd"> &lt;https://openreview.net/pdf?id=SJl3z659UH&gt;`_.</span>

Expand Down Expand Up @@ -345,7 +345,7 @@ <h1>Source code for doctr.datasets.cord</h1><div class="highlight"><pre>
<span class="s2">&quot;cord_test.zip&quot;</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">train</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="n">use_polygons</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
Expand Down Expand Up @@ -422,7 +422,7 @@ <h1>Source code for doctr.datasets.cord</h1><div class="highlight"><pre>

<span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">=</span> <span class="n">tmp_root</span>

<span class="k">def</span> <span class="nf">extra_repr</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="k">def</span><span class="w"> </span><span class="nf">extra_repr</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;train=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">train</span><span class="si">}</span><span class="s2">&quot;</span></div>

</pre></div>
Expand All @@ -437,7 +437,7 @@ <h1>Source code for doctr.datasets.cord</h1><div class="highlight"><pre>
<div class="bottom-of-page">
<div class="left-details">
<div class="copyright">
Copyright &#169; 2021-2024, Mindee
Copyright &#169; 2021-2025, Mindee
</div>
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s

Expand Down
26 changes: 13 additions & 13 deletions _modules/doctr/datasets/detection.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="shortcut icon" href="../../../_static/favicon.ico"/><!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 -->
<title>doctr.datasets.detection - docTR documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=649a27d8" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=d75fae25" />
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/mindee.css?v=75ddc721" />
Expand Down Expand Up @@ -297,23 +297,23 @@ <h1>Source code for doctr.datasets.detection</h1><div class="highlight"><pre>
<span class="c1"># This program is licensed under the Apache License 2.0.</span>
<span class="c1"># See LICENSE or go to &lt;https://opensource.org/licenses/Apache-2.0&gt; for full license details.</span>

<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Type</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">json</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">typing</span><span class="w"> </span><span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Type</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">np</span>

<span class="kn">from</span> <span class="nn">doctr.file_utils</span> <span class="kn">import</span> <span class="n">CLASS_NAME</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">doctr.file_utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">CLASS_NAME</span>

<span class="kn">from</span> <span class="nn">.datasets</span> <span class="kn">import</span> <span class="n">AbstractDataset</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">pre_transform_multiclass</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">.datasets</span><span class="w"> </span><span class="kn">import</span> <span class="n">AbstractDataset</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">.utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">pre_transform_multiclass</span>

<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;DetectionDataset&quot;</span><span class="p">]</span>


<div class="viewcode-block" id="DetectionDataset">
<a class="viewcode-back" href="../../../modules/datasets.html#doctr.datasets.DetectionDataset">[docs]</a>
<span class="k">class</span> <span class="nc">DetectionDataset</span><span class="p">(</span><span class="n">AbstractDataset</span><span class="p">):</span>
<span class="k">class</span><span class="w"> </span><span class="nc">DetectionDataset</span><span class="p">(</span><span class="n">AbstractDataset</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Implements a text detection dataset</span>

<span class="sd"> &gt;&gt;&gt; from doctr.datasets import DetectionDataset</span>
Expand All @@ -329,7 +329,7 @@ <h1>Source code for doctr.datasets.detection</h1><div class="highlight"><pre>
<span class="sd"> **kwargs: keyword arguments from `AbstractDataset`.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">img_folder</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">label_path</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
Expand Down Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.detection</h1><div class="highlight"><pre>

<span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">img_name</span><span class="p">,</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="n">geoms</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np_dtype</span><span class="p">),</span> <span class="n">polygons_classes</span><span class="p">)))</span>

<span class="k">def</span> <span class="nf">format_polygons</span><span class="p">(</span>
<span class="k">def</span><span class="w"> </span><span class="nf">format_polygons</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">polygons</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">List</span><span class="p">,</span> <span class="n">Dict</span><span class="p">],</span> <span class="n">use_polygons</span><span class="p">:</span> <span class="nb">bool</span><span class="p">,</span> <span class="n">np_dtype</span><span class="p">:</span> <span class="n">Type</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Format polygons into an array</span>
Expand Down Expand Up @@ -390,7 +390,7 @@ <h1>Source code for doctr.datasets.detection</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">geoms</span><span class="p">,</span> <span class="n">polygons_classes</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">class_names</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">class_names</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_class_names</span><span class="p">))</span></div>

</pre></div>
Expand All @@ -405,7 +405,7 @@ <h1>Source code for doctr.datasets.detection</h1><div class="highlight"><pre>
<div class="bottom-of-page">
<div class="left-details">
<div class="copyright">
Copyright &#169; 2021-2024, Mindee
Copyright &#169; 2021-2025, Mindee
</div>
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s

Expand Down
Loading

0 comments on commit ad2d56a

Please sign in to comment.