Skip to content

Commit

Permalink
boring script out dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Lane committed Nov 19, 2024
1 parent a2d8404 commit 20188e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
3 changes: 2 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ felix_labels_dir_2: "1Felix and Rich make models/Training dataset Tiffs/Training
wahab_labels_dir: "1Felix and Rich make models/Training dataset Tiffs/Training set 1"

# Where random stuff from the scripts should go, relative to the root of the repository
script_output: "script_output/"
script_output: "script_output/"
boring_script_output: "script_output/boring_stuff/"
14 changes: 14 additions & 0 deletions fishjaw/util/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,17 @@ def script_out_dir() -> pathlib.Path:
if not retval.is_dir():
retval.mkdir()
return retval


def boring_script_out_dir() -> pathlib.Path:
"""
Get the directory where the output of the extra scripts is stored,
creating it if it doesn't exist
:returns: Path to the directory
"""
retval = pathlib.Path(__file__).parents[2] / "boring_script_output"
if not retval.is_dir():
retval.mkdir()
return retval
18 changes: 0 additions & 18 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,3 @@ Roughly in the order that you might run them:
- `arch_summary.py`: summarise the architecture of the model
- `inference_example.py`: run inference on some data
- `mesh.py`: create and visualise a mesh from the inference

Some others that you probably won't run at all, because they're basically not interesting
- `check_loss.py`: check that the loss function behaves as you might expect,
including how it behaves at chance and perfect performance.
So that the expected loss is 0.0 at perfect performance and
$\frac{1}{1+\frac{1}{2}\alpha + \frac{1}{2}\beta}$ at chance performance,
This script doesn't use a sigmoid or softmax activation fcn.
Creates a plot named `chance_loss.png`.
- `find_rear_jaw_centres.py`: find the ZXY locations of the jaw in of the rear jaw dataset. We need this
because we want to crop our jaw from the last labelled slice backwards (towards
the tail) so that our cropped out regions of interest don't contain any unlabelled
jaw voxels. This script makes some decisions and crops the jaws.
- `plot_cropped.py`: check that the cropping code gives us the correct regions.
This is intended to be a check that the cropping code correctly
gives us the correct slices for the rear jaw DICOMs, since it's
important that there's no unlabelled jaw in the training data.
- `lines_of_code.py`: plot the total lines of code in this respository over time. Just for fun!!!!
- `find_occupancy.py`: find how much of each DICOM is occupied by jaw voxels, for both the cropped and uncropped DICOMs.

0 comments on commit 20188e6

Please sign in to comment.