Skip to content

Commit

Permalink
[skip ci] Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Jan 4, 2024
1 parent 2858ea6 commit 2fdfd4b
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion latest/_modules/doctr/datasets/imgur5k.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.imgur5k</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">ann</span><span class="p">[</span><span class="s2">&quot;word&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;.&quot;</span>
<span class="p">]</span>
<span class="c1"># (x, y) coordinates of top left, top right, bottom right, bottom left corners</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span> <span class="c1"># type: ignore[arg-type]</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">use_polygons</span><span class="p">:</span>
<span class="c1"># xmin, ymin, xmax, ymax</span>
Expand Down
4 changes: 2 additions & 2 deletions latest/_modules/doctr/utils/metrics.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h1>Source code for doctr.utils.metrics</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="n">abs_box</span> <span class="o">=</span> <span class="n">box</span>
<span class="n">abs_box</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span> <span class="o">=</span> <span class="n">abs_box</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">mask</span><span class="p">,</span> <span class="p">[</span><span class="n">abs_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">mask</span><span class="p">,</span> <span class="p">[</span><span class="n">abs_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">)</span> <span class="c1"># type: ignore[call-overload]</span>

<span class="k">return</span> <span class="n">mask</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">bool</span><span class="p">)</span>

Expand Down Expand Up @@ -554,7 +554,7 @@ <h1>Source code for doctr.utils.metrics</h1><div class="highlight"><pre>

<span class="c1"># TODO: optimize slicing to improve vectorization</span>
<span class="k">for</span> <span class="n">idx</span><span class="p">,</span> <span class="n">_box</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">abs_boxes</span><span class="p">):</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">masks</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span> <span class="p">[</span><span class="n">_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">masks</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span> <span class="p">[</span><span class="n">_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">)</span> <span class="c1"># type: ignore[call-overload]</span>
<span class="k">return</span> <span class="n">masks</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">bool</span><span class="p">)</span>


Expand Down
2 changes: 1 addition & 1 deletion v0.1.0/_modules/doctr/datasets/imgur5k.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.imgur5k</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">ann</span><span class="p">[</span><span class="s2">&quot;word&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;.&quot;</span>
<span class="p">]</span>
<span class="c1"># (x, y) coordinates of top left, top right, bottom right, bottom left corners</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span> <span class="c1"># type: ignore[arg-type]</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">use_polygons</span><span class="p">:</span>
<span class="c1"># xmin, ymin, xmax, ymax</span>
Expand Down
4 changes: 2 additions & 2 deletions v0.1.0/_modules/doctr/utils/metrics.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h1>Source code for doctr.utils.metrics</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="n">abs_box</span> <span class="o">=</span> <span class="n">box</span>
<span class="n">abs_box</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span> <span class="o">=</span> <span class="n">abs_box</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">mask</span><span class="p">,</span> <span class="p">[</span><span class="n">abs_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">mask</span><span class="p">,</span> <span class="p">[</span><span class="n">abs_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">)</span> <span class="c1"># type: ignore[call-overload]</span>

<span class="k">return</span> <span class="n">mask</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">bool</span><span class="p">)</span>

Expand Down Expand Up @@ -554,7 +554,7 @@ <h1>Source code for doctr.utils.metrics</h1><div class="highlight"><pre>

<span class="c1"># TODO: optimize slicing to improve vectorization</span>
<span class="k">for</span> <span class="n">idx</span><span class="p">,</span> <span class="n">_box</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">abs_boxes</span><span class="p">):</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">masks</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span> <span class="p">[</span><span class="n">_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">fillPoly</span><span class="p">(</span><span class="n">masks</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span> <span class="p">[</span><span class="n">_box</span> <span class="o">-</span> <span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">)</span> <span class="c1"># type: ignore[call-overload]</span>
<span class="k">return</span> <span class="n">masks</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">bool</span><span class="p">)</span>


Expand Down
2 changes: 1 addition & 1 deletion v0.1.1/_modules/doctr/datasets/imgur5k.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.imgur5k</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">ann</span><span class="p">[</span><span class="s2">&quot;word&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;.&quot;</span>
<span class="p">]</span>
<span class="c1"># (x, y) coordinates of top left, top right, bottom right, bottom left corners</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span> <span class="c1"># type: ignore[arg-type]</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">use_polygons</span><span class="p">:</span>
<span class="c1"># xmin, ymin, xmax, ymax</span>
Expand Down
2 changes: 1 addition & 1 deletion v0.2.0/_modules/doctr/datasets/imgur5k.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.imgur5k</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">ann</span><span class="p">[</span><span class="s2">&quot;word&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;.&quot;</span>
<span class="p">]</span>
<span class="c1"># (x, y) coordinates of top left, top right, bottom right, bottom left corners</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span> <span class="c1"># type: ignore[arg-type]</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">use_polygons</span><span class="p">:</span>
<span class="c1"># xmin, ymin, xmax, ymax</span>
Expand Down
2 changes: 1 addition & 1 deletion v0.2.1/_modules/doctr/datasets/imgur5k.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h1>Source code for doctr.datasets.imgur5k</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">ann</span><span class="p">[</span><span class="s2">&quot;word&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;.&quot;</span>
<span class="p">]</span>
<span class="c1"># (x, y) coordinates of top left, top right, bottom right, bottom left corners</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span>
<span class="n">box_targets</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv2</span><span class="o">.</span><span class="n">boxPoints</span><span class="p">(((</span><span class="n">box</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="p">(</span><span class="n">box</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">box</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span> <span class="n">box</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span> <span class="k">for</span> <span class="n">box</span> <span class="ow">in</span> <span class="n">_boxes</span><span class="p">]</span> <span class="c1"># type: ignore[arg-type]</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">use_polygons</span><span class="p">:</span>
<span class="c1"># xmin, ymin, xmax, ymax</span>
Expand Down
Loading

0 comments on commit 2fdfd4b

Please sign in to comment.