Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed May 5, 2024
1 parent 4e6b9cd commit 4effbf2
Show file tree
Hide file tree
Showing 8 changed files with 1,785 additions and 1,705 deletions.
370 changes: 208 additions & 162 deletions micro_sam.html

Large diffs are not rendered by default.

1,037 changes: 517 additions & 520 deletions micro_sam/bioimageio/model_export.html

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions micro_sam/evaluation/evaluation.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,14 @@ <h1 class="modulename">
</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a> <span class="n">list_of_results</span> <span class="o">=</span> <span class="p">[]</span>
</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a> <span class="n">prediction_folders</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">glob</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">prediction_root</span><span class="p">,</span> <span class="s2">&quot;iteration*&quot;</span><span class="p">)))</span>
</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a> <span class="k">for</span> <span class="n">pred_folder</span> <span class="ow">in</span> <span class="n">prediction_folders</span><span class="p">:</span>
</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Evaluating&quot;</span><span class="p">,</span> <span class="n">pred_folder</span><span class="p">)</span>
</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Evaluating&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">pred_folder</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a> <span class="n">pred_paths</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">glob</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pred_folder</span><span class="p">,</span> <span class="s2">&quot;*&quot;</span><span class="p">)))</span>
</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a> <span class="n">result</span> <span class="o">=</span> <span class="n">run_evaluation</span><span class="p">(</span><span class="n">gt_paths</span><span class="o">=</span><span class="n">gt_paths</span><span class="p">,</span> <span class="n">prediction_paths</span><span class="o">=</span><span class="n">pred_paths</span><span class="p">,</span> <span class="n">save_path</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a> <span class="n">list_of_results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a> <span class="nb">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a>
</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a> <span class="n">res_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">list_of_results</span><span class="p">,</span> <span class="n">ignore_index</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a> <span class="n">res_df</span><span class="o">.</span><span class="n">to_csv</span><span class="p">(</span><span class="n">csv_path</span><span class="p">)</span>
</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a>
</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a>
</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a><span class="c1"># TODO function to evaluate full experiment and resave in one table</span>
</span></pre></div>


Expand Down Expand Up @@ -314,7 +311,7 @@ <h6 id="returns">Returns:</h6>
</span><span id="run_evaluation_for_iterative_prompting-116"><a href="#run_evaluation_for_iterative_prompting-116"><span class="linenos">116</span></a> <span class="n">list_of_results</span> <span class="o">=</span> <span class="p">[]</span>
</span><span id="run_evaluation_for_iterative_prompting-117"><a href="#run_evaluation_for_iterative_prompting-117"><span class="linenos">117</span></a> <span class="n">prediction_folders</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">glob</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">prediction_root</span><span class="p">,</span> <span class="s2">&quot;iteration*&quot;</span><span class="p">)))</span>
</span><span id="run_evaluation_for_iterative_prompting-118"><a href="#run_evaluation_for_iterative_prompting-118"><span class="linenos">118</span></a> <span class="k">for</span> <span class="n">pred_folder</span> <span class="ow">in</span> <span class="n">prediction_folders</span><span class="p">:</span>
</span><span id="run_evaluation_for_iterative_prompting-119"><a href="#run_evaluation_for_iterative_prompting-119"><span class="linenos">119</span></a> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Evaluating&quot;</span><span class="p">,</span> <span class="n">pred_folder</span><span class="p">)</span>
</span><span id="run_evaluation_for_iterative_prompting-119"><a href="#run_evaluation_for_iterative_prompting-119"><span class="linenos">119</span></a> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Evaluating&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">pred_folder</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
</span><span id="run_evaluation_for_iterative_prompting-120"><a href="#run_evaluation_for_iterative_prompting-120"><span class="linenos">120</span></a> <span class="n">pred_paths</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">glob</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pred_folder</span><span class="p">,</span> <span class="s2">&quot;*&quot;</span><span class="p">)))</span>
</span><span id="run_evaluation_for_iterative_prompting-121"><a href="#run_evaluation_for_iterative_prompting-121"><span class="linenos">121</span></a> <span class="n">result</span> <span class="o">=</span> <span class="n">run_evaluation</span><span class="p">(</span><span class="n">gt_paths</span><span class="o">=</span><span class="n">gt_paths</span><span class="p">,</span> <span class="n">prediction_paths</span><span class="o">=</span><span class="n">pred_paths</span><span class="p">,</span> <span class="n">save_path</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span><span id="run_evaluation_for_iterative_prompting-122"><a href="#run_evaluation_for_iterative_prompting-122"><span class="linenos">122</span></a> <span class="n">list_of_results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit 4effbf2

Please sign in to comment.