Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pipeline to use grain crop dictionaries #1022

Open
wants to merge 145 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
58757ad
WIP: Scope out refactor for grains.py
SylviaWhittle Nov 18, 2024
f49b1e6
WIP: Begin grains > grainstats pipeline overhaul. Outline data struct…
SylviaWhittle Nov 19, 2024
4334027
WIP: Scope out changes to GrainStats.calculate_stats to allow for mul…
SylviaWhittle Nov 19, 2024
d106b0f
WIP: Initial proposal for grainstats using grain dictionary refactor
SylviaWhittle Nov 19, 2024
1acee67
Add function: graincrops_merge_classes
SylviaWhittle Nov 21, 2024
a7b9075
Add function: graincrops_update_background_class
SylviaWhittle Nov 21, 2024
913e3b5
Update: extract_grains_from_full_image now works in theory, untested
SylviaWhittle Nov 21, 2024
843a606
Fix: extract_grains_from_full_image_mask: allocating region to empty …
SylviaWhittle Nov 21, 2024
535bea8
WIP: Switch vetting, merging and update background to work on dicts o…
SylviaWhittle Nov 21, 2024
36c07e2
WIP: Update vet_grains to take / return dicts of GrainCrops
SylviaWhittle Nov 21, 2024
d1e4c1d
WIP: Update grainstats handling of dataframe to use list of dicts for…
SylviaWhittle Nov 21, 2024
ace46ea
Fix: validate_full_mask_tensor_shape: Require len(shape) == 3, shape[…
SylviaWhittle Nov 22, 2024
e2824f9
Edit: find_grains now stores grains in self.image_grain_crops: ImageG…
SylviaWhittle Nov 22, 2024
f21eccd
WIP: Handle ImageGrainCrops between run_grains and run_grainstats
SylviaWhittle Nov 22, 2024
63d0003
WIP: Graintstats handles ImageGrainCrops
SylviaWhittle Nov 22, 2024
02ecf43
Fix: grainstats: process scan no longer needing grain plots returned
SylviaWhittle Nov 22, 2024
651e89c
WIP: Begin grains > disordered_tracing pipeline overhaul
SylviaWhittle Nov 22, 2024
a0370cc
Merge branch 'main' into SylviaWhittle/grain_restructure
SylviaWhittle Nov 22, 2024
a03524e
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Nov 22, 2024
8d215fd
WIP: grains > disorderd_tracing pipeline | fix typing and remove whol…
SylviaWhittle Nov 26, 2024
3a18880
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Nov 26, 2024
7781c86
Add: class index to disordered tracing config
SylviaWhittle Dec 4, 2024
80b711c
[WIP] Fix: Attempt to fix grain_number double index issue
SylviaWhittle Dec 10, 2024
4c6f0f3
remove raising error on empty direction
SylviaWhittle Dec 11, 2024
e061001
Add padding to the grains section of config and remove from unet sect…
SylviaWhittle Dec 17, 2024
8855707
[WIP]: Attempt to fix data passing errors between processing and diso…
SylviaWhittle Dec 17, 2024
9f59678
Attempt merge with main (grains.py taken from branch, disorderd.py ta…
SylviaWhittle Dec 18, 2024
6547c59
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Dec 18, 2024
8030c8e
Add post init script to validate input data to GrainCrop dataclass
SylviaWhittle Dec 18, 2024
b2ec80d
Fix bug: wrong (old) graincrops returned from unet masking
SylviaWhittle Dec 18, 2024
be9f663
Fix bug: wrong bbox used in construction of GrainCrop dataclass causi…
SylviaWhittle Dec 18, 2024
fc938fb
Fix: padding wrongly subtracted in nodestats and ordered_tracing
SylviaWhittle Dec 18, 2024
ba08b36
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Dec 18, 2024
8da84e2
Add: image grain crops to topostats object and fix process scan both …
SylviaWhittle Dec 20, 2024
cec5301
Add more rigorous GrainCrop setters and getters
SylviaWhittle Dec 20, 2024
7f75723
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Dec 20, 2024
a4d430e
Add and Fix: Add filename and p2nm to GrainCrop dataclass and fix dat…
SylviaWhittle Jan 6, 2025
dda6807
Fix: GrainCropsDirection private name attribute
SylviaWhittle Jan 6, 2025
d4da1b9
Fix-test: Create a dummy_graincrops_dictionary fixture and use it in …
SylviaWhittle Jan 6, 2025
5fa8997
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 6, 2025
19f2a7a
Fix-test: test_grainstats.py::test_no_grains badly constructed GrainS…
SylviaWhittle Jan 6, 2025
0f7a27e
Fix: Grainstats messy handling of pixel to nm scaling
SylviaWhittle Jan 8, 2025
30ad66e
Add: minicircle_small_graincrops fixture for use in tests requiring g…
SylviaWhittle Jan 8, 2025
de8bf64
Fix: grainstats_minicircle fixture so it now uses minicircle_small_gr…
SylviaWhittle Jan 8, 2025
4f0419b
Fix: Regtest was wrong before! Bad corrdinates! This is the actual co…
SylviaWhittle Jan 8, 2025
899025e
Fix: Tidy up grainstats interactions with other functions
SylviaWhittle Jan 8, 2025
e71fd06
Fix: construct_full_mask_from_crops incorrectly subtracting padding
SylviaWhittle Jan 8, 2025
e720d6b
Fix: Couple extra parts that erroneously passed p2nm to GrainStats co…
SylviaWhittle Jan 8, 2025
deb158a
Add: Allow construct_full_mask_from_graincrops to take any number of …
SylviaWhittle Jan 8, 2025
07aa8a6
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 9, 2025
93763f6
Add: equality checks for Grains dataclasses
SylviaWhittle Jan 9, 2025
765ca50
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 9, 2025
18daaf2
Fix: make_bounding_box_square not taking exclusive maximum row/col in…
SylviaWhittle Jan 9, 2025
dcdb315
Edit: How construct_full_mask_from_graincrops determines the num of c…
SylviaWhittle Jan 9, 2025
a998b0a
Fix: Half of the traditional test_find_grains test
SylviaWhittle Jan 9, 2025
ac08760
Tidy up
SylviaWhittle Jan 9, 2025
a9db222
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 10, 2025
68e0c77
Add: Debug functions for dataclasses to find differences
SylviaWhittle Jan 10, 2025
d086e4e
Fix: Bugs caused by bad argument passing in grains.py
SylviaWhittle Jan 10, 2025
5f26e27
Fix: Background not being updated duing construction of full mask fro…
SylviaWhittle Jan 10, 2025
f2113ae
Fix: When no grains, skip later grain finding stages
SylviaWhittle Jan 10, 2025
8cc434b
Add test: no grains found
SylviaWhittle Jan 10, 2025
09c383f
Fix test: test_find_grains_unet
SylviaWhittle Jan 10, 2025
2f30131
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 10, 2025
66087ed
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 10, 2025
7924f6e
Fix: Wrong indentation in grains.py
SylviaWhittle Jan 10, 2025
55ee801
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 10, 2025
769e9bd
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 10, 2025
d4fdfad
Fix test: test_improve_grain_segmentation_unet: regular
SylviaWhittle Jan 13, 2025
1e59825
Fix test: test_improve_grain_segmentation_unet: no grains
SylviaWhittle Jan 13, 2025
37cb0b8
Edit: improve_grain_segmentation_unet now skips empty predictions and…
SylviaWhittle Jan 13, 2025
75ac205
Fix: test_improve_grain_segmentation_unet : empty prediction test
SylviaWhittle Jan 13, 2025
cd7c7c1
WIP: Fix test_trace_image_disorderd (need still do diagnostic images)
SylviaWhittle Jan 13, 2025
b3caec6
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 13, 2025
3a45550
Fix: Get process scan both test running but failing again, fixing IO …
SylviaWhittle Jan 13, 2025
628a956
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 13, 2025
234f6dd
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 13, 2025
f056f3b
Fix: test_trace_image_disordered
SylviaWhittle Jan 13, 2025
5e0c41e
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 13, 2025
08a5385
Add update background class method to GrainCropsDirection
SylviaWhittle Jan 17, 2025
6c7f65e
Edit: Make the way plot images are generated in grains.find_grains mo…
SylviaWhittle Jan 17, 2025
bd34c54
Add unet tensor, vetted tensor, merged tensor to output plots
SylviaWhittle Jan 17, 2025
f4edd83
Fix: Tracing tests | verified with Max, produces correct catenane res…
SylviaWhittle Jan 17, 2025
83aaed2
WIP: Fix handling grains output plots
SylviaWhittle Jan 17, 2025
2ea83c4
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 17, 2025
6721a17
Fix: Full grain image tensor plotting & delete coloured grains images
SylviaWhittle Jan 21, 2025
d7ea62e
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 21, 2025
af7d98d
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 21, 2025
4495bd8
Fix: Plotting individual grains
SylviaWhittle Jan 21, 2025
b14ea51
Fix test_vet_grains
SylviaWhittle Jan 23, 2025
4417f2e
Fix: pixel to nm scaling passed to vet_grains
SylviaWhittle Jan 23, 2025
44784ea
Add: test_vet_grains test case for no params
SylviaWhittle Jan 23, 2025
51269f7
Fix test: test_trace_image_disordered_dataframes
SylviaWhittle Jan 23, 2025
a6e2289
Fix grain_number not in result dataframes by stopping using grain_num…
SylviaWhittle Jan 24, 2025
a6c8aec
Fix test: test_create_empty_dataframe (removed grain_number index)
SylviaWhittle Jan 24, 2025
364caee
Fix tests: splining
SylviaWhittle Jan 27, 2025
f79e50c
Fix test: test_trace_extract_height_profile
SylviaWhittle Jan 27, 2025
d9dfe5f
Fix test: test_grainstats_minicircle regression
SylviaWhittle Jan 27, 2025
3999737
Fix: create empty dataframe must not take index argument anymore
SylviaWhittle Jan 27, 2025
9209bc5
Fix test: test_save_format (test_processing.py) output mask images ch…
SylviaWhittle Jan 27, 2025
7d362b4
Fix test: test_save_cropped_grains (added class number to filenames)
SylviaWhittle Jan 27, 2025
24ebd75
Fix Image.NEAREST deprecation in favour of Image.Resampling.NEAREST
SylviaWhittle Jan 27, 2025
75c56a0
Add: mandatory check for graincrops to remove objects too small to pr…
SylviaWhittle Jan 28, 2025
87da59a
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 28, 2025
fc7028a
Fix test: test_run_grainstats
SylviaWhittle Jan 29, 2025
113a14d
Fix test: test_run_grains
SylviaWhittle Jan 29, 2025
062a075
Fix test: test_process_stages
SylviaWhittle Jan 29, 2025
64aaaf8
Fix test: test_process_scan_below
SylviaWhittle Jan 29, 2025
aa1bd42
Fix test: test_process_scan_below_height_profiles (dictionary added s…
SylviaWhittle Jan 29, 2025
aa72752
Fix test: test_process_scan_above_height_profiles (dictionary added s…
SylviaWhittle Jan 29, 2025
933f09e
Fix test: test_process_scan_no_grains: add proper logging for no grai…
SylviaWhittle Jan 29, 2025
0bfe6df
Fix test: test_process_scan_above (new columns and fixed centre posit…
SylviaWhittle Jan 29, 2025
dc544fa
Fix test: test_process_scan_both
SylviaWhittle Jan 29, 2025
e7e00b6
Fix tests: test_reconcile_config_args_partial and partial with overrides
SylviaWhittle Jan 29, 2025
7d2e4f1
Merge remote-tracking branch 'origin/SylviaWhittle/grain_restructure'…
SylviaWhittle Jan 29, 2025
3756169
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 29, 2025
7ce0fbd
Pre-commit fix: grains.py
SylviaWhittle Jan 30, 2025
ce9db40
Add test: test_graincrops_update_background_class
SylviaWhittle Jan 30, 2025
c337dc1
Add test: test_graincrops_remove_objects_too_small_to_process
SylviaWhittle Jan 31, 2025
7f25fbe
Linting: test_grains.py
SylviaWhittle Jan 31, 2025
afa5613
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Jan 31, 2025
59a2a14
Add test: test_graincrops_merge_classes
SylviaWhittle Feb 3, 2025
973f7cd
Add tests: GrainCrop class
SylviaWhittle Feb 3, 2025
857e920
Add test: test_validate_full_mask_tensor
SylviaWhittle Feb 3, 2025
236e695
Add test: test_graincropsdirection_update_full_mask_tensor
SylviaWhittle Feb 3, 2025
fb8aaaa
Linting: processing.py
SylviaWhittle Feb 4, 2025
f0bf8a7
Linting: grainstats.py
SylviaWhittle Feb 4, 2025
1c5ddd8
Tidy up disorderd_tracing.py: remove prep_arrays, pad_width argument,…
SylviaWhittle Feb 4, 2025
23562f7
Tidy up nodestats, remove pad_width argument
SylviaWhittle Feb 4, 2025
7b8c764
Tidy up ordered_tracing, remove pad_width argument
SylviaWhittle Feb 4, 2025
e4659e1
Tidy up unet_masking.py
SylviaWhittle Feb 4, 2025
be2e8ad
Merge main into grains refactor
SylviaWhittle Feb 4, 2025
41a682d
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Feb 4, 2025
0761c9c
Actually finally delete testmondata (sorry)
SylviaWhittle Feb 5, 2025
cf6b706
Chore: Ignore testmondata
SylviaWhittle Feb 5, 2025
b046f74
Edit: .topostats file contains full mask tensors now
SylviaWhittle Feb 10, 2025
8c26042
Tidy: Remove print statements
SylviaWhittle Feb 10, 2025
0061b7c
Tidy: conftest.py
SylviaWhittle Feb 10, 2025
eded504
Tidy: test_processing.py
SylviaWhittle Feb 10, 2025
59d7398
Fix test: test_ordered_tracing_image: topoly version issue
SylviaWhittle Feb 11, 2025
59bab1b
Add documentation for added config options
SylviaWhittle Feb 11, 2025
6f4ba99
Add parameters to entry_point.py
SylviaWhittle Feb 11, 2025
b67926d
Add documentation to data_dictionary.md for subgrain number and class…
SylviaWhittle Feb 11, 2025
3beda32
Add brief explanations in advanced/grain_finding.md for the GrainCrop…
SylviaWhittle Feb 11, 2025
c3e930e
Fix test: entry points parameter tests
SylviaWhittle Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ _build/

# Tests and docs
.coverage
.testmondata
.testmondata*

# Ignore topostats/_version.py as per setuptools_scm
topostats/_version.py
Expand All @@ -232,4 +232,4 @@ pytest-debug.ini
.dir-locals.el

# tmp directory
tmp/
tmp/
36 changes: 33 additions & 3 deletions docs/advanced/grain_finding.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TopoStats automatically tries to find grains (objects of interest) in your AFM i
- **Size thresholding**: We remove grains that are too small or too large.
- **Optional: U-Net mask improvement**: We can use a U-Net to improve the mask of each grain.

## Height thresholding
### Basic Height Thresholding

Grain finding is the process of detecting useful objects in your AFM images. This might be DNA, proteins, holes in a
surface or ridges on a surface.
Expand Down Expand Up @@ -64,13 +64,43 @@ maximum area of the grains that you want to keep, in nanometers squared. Eg if y

![size_thresholding](../_static/images/grain_finding/grain_finding_size_thresholding.png)

## Tensors

After basic grain finding is performed in order to identify objects of interest, the grain mask is turned into a tensor.
A tensor is simply a 3D array. In this case, the tensor is the same shape as the AFM image, Width x Height, but with an
added dimension, Class, making the tensor a W x H x C shaped 3D object. Imagine lots of printed out paper sheets stacked
on top of each other to form a block of paper.

This data structure allows us to have multiple masks per image, and so allows for masking of different types of
features, for example DNA and proteins. This is called "multi-class-masking".

Initially, this tensor is just given two binary classes, `0`, and `1`. Class `0` is the background class and is 1 where
there are no grains in the other classes and 0 where there are grains in any of the other classes. Class `1` is simply
the mask produced by the basic grain detection, which usually is designed to be segmenting `DNA` but could really be
anything.

Multi class masking is able to be performed on the existing grains by using a U-Net (a deep-learning feature detection
program) which can optionally be ran after simple grain finding, though needs training.

It is planned to be able to run multiple rounds of traditional thresholding instead of running a U-Net for easier but
less powerful multi-class segmentation implementations.

## Grain Crops

Once the mask has been turned into a tensor, the grains are then cropped from the tensor to produce a mini tensor for
each grain, allowing for easier processing of individual grains. They are stored in `GrainCrop` dataclasses and are held
in a dictionary within a `GrainCropDirection` dataclass instance, which in turn is held in the `ImageGrainCrops`
dataclass instance for the whole image.

For more information on the `ImageGrainCrop`, `GrainCropDirection`, and `GrainCrop` dataclasses, see the [TopoStats API documentation.](https://afm-spm.github.io/TopoStats/main/autoapi/index.html)

## Optional: U-Net mask improvement

As an additional optional step, each grain that reaches this stage can be improved by using a U-Net to mask the grain
again. This requires a U-Net model path to be supplied in the config file.

The U-Net model will take the bounding box of each grain, makes it square, and passees it to a trained U-Net model
which makes a prediction for a better mask, which then replaces the original mask.
Each `GrainCrop`'s image crop is passed to a trained U-Net model which makes a prediction for a better mask, which then
replaces the original mask tensor.

Here is an example comparing absolute height thresholding to U-Net masking for one of our projects. The white boxes
indicate regions where the height threhsold performs poorly and is improved by the U-Net mask.
Expand Down
7 changes: 3 additions & 4 deletions docs/configuration.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/data_dictionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The `all_statistics.csv` file contains details on each grain that has been detec
| `image` | Filename (minus extension) of scan. | `str` | N/A |
| `threshold` | Whether grain is `above` or `below` a threshold. | `str` | N/A |
| `grain_number` | Number of found grain (starts at `0`) | `int` | N/A |
| `class_number` | Class of the object (eg DNA or protein) | `int` | N/A |
| `subgrain_number` | Number of the sub-grain within the grain | `int` | N/A |
| `centre_x` | x coordinate of grain centre. | `float` | m |
| `centre_y` | y coordinate of grain centre. | `float` | m |
| `radius_min` | minimum distance from the centroid to edge of the grain. | `float` | m |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
centre_x centre_y radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image
grain_number
0 7.500895e-08 4.775362e-08 4.044948e-09 2.542964e-08 1.600048e-08 1.647888e-08 1.006306e-09 2.696640e-09 1.597337e-09 1.596062e-09 1.084371e-24 6.794043e-16 1.319762e-15 2.053897e-08 5.037861e-08 1.034725e-15 0.407692 above 5.037861e-08 2.053897e-08 None
1 8.028649e-08 7.895237e-08 6.658610e-09 2.623645e-08 1.609777e-08 1.573693e-08 1.009513e-09 2.480685e-09 1.668932e-09 1.683197e-09 1.031843e-24 6.130257e-16 1.526707e-15 2.017441e-08 4.942135e-08 9.970467e-16 0.408213 above 4.987228e-08 2.017441e-08 None
2 4.001424e-08 7.585689e-08 9.745734e-09 2.369314e-08 1.746942e-08 1.818722e-08 1.006681e-09 2.139365e-09 1.646541e-09 1.598842e-09 1.123717e-24 7.028320e-16 1.546230e-15 3.359220e-08 4.149625e-08 1.393950e-15 0.809524 above 4.440534e-08 3.176819e-08 None
grain_number class_number subgrain_number centre_x centre_y radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image
0 0 1 0 3.548872e-08 9.122587e-08 4.044948e-09 2.542964e-08 1.600048e-08 1.647888e-08 1.006306e-09 2.696640e-09 1.597337e-09 1.596062e-09 1.084371e-24 6.794043e-16 1.319762e-15 2.053897e-08 5.037861e-08 1.034725e-15 0.407692 above 5.037861e-08 2.053897e-08 None
1 1 1 0 7.238244e-08 1.224246e-07 6.658610e-09 2.623645e-08 1.609777e-08 1.573693e-08 1.009513e-09 2.480685e-09 1.668932e-09 1.683197e-09 1.031843e-24 6.130257e-16 1.526707e-15 2.017441e-08 4.942135e-08 9.970467e-16 0.408213 above 4.987228e-08 2.017441e-08 None
2 2 1 0 7.755846e-08 1.272332e-07 9.745734e-09 2.369314e-08 1.746942e-08 1.818722e-08 1.006681e-09 2.139365e-09 1.646541e-09 1.598842e-09 1.123717e-24 7.028320e-16 1.546230e-15 3.359220e-08 4.149625e-08 1.393950e-15 0.809524 above 4.440534e-08 3.176819e-08 None
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image_size_x_m image_size_y_m image_area_m2 image_size_x_px image_size_y_px image_area_px2 grains_number_above grains_per_m2_above grains_number_below grains_per_m2_below rms_roughness
image
minicircle_small 1.2646e-07 1.2646e-07 1.5993e-14 64 64 4096 3 1.8758e+14 0 0.0000e+00 6.8208e-10
centre_x centre_y grain_number radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image grain_endpoints grain_junctions total_branch_lengths grain_width_mean num_crossings avg_crossing_confidence min_crossing_confidence num_mols writhe_string total_contour_length average_end_to_end_distance
0 7.5100e-08 4.7559e-08 0 3.9431e-09 2.5631e-08 1.6016e-08 1.6680e-08 9.1991e-10 2.6422e-09 1.5338e-09 1.5341e-09 1.0543e-24 6.8721e-16 1.3198e-15 2.0539e-08 5.0379e-08 1.0347e-15 4.0769e-01 above 5.0379e-08 2.0539e-08 minicircle_small 1 1 8.4571e-08 8.2685e-09 1 NaN NaN 2 6.5881e-08 8.8370e-09
1 8.0241e-08 7.8677e-08 1 6.8951e-09 2.7188e-08 1.6272e-08 1.6263e-08 9.0630e-10 2.4586e-09 1.6144e-09 1.6264e-09 1.0352e-24 6.3645e-16 1.5931e-15 2.0174e-08 5.1212e-08 1.0332e-15 3.9394e-01 above 5.1262e-08 2.0174e-08 minicircle_small 0 0 7.3054e-08 7.6154e-09 0 NaN NaN 1 NaN 5.8272e-08 0.0000e+00
2 4.0012e-08 7.5644e-08 2 9.9461e-09 2.3654e-08 1.7561e-08 1.8364e-08 9.0641e-10 2.1066e-09 1.5939e-09 1.5493e-09 1.1192e-24 7.2236e-16 1.5462e-15 3.3592e-08 4.1496e-08 1.3940e-15 8.0952e-01 above 4.4405e-08 3.2528e-08 minicircle_small 0 0 1.0447e-07 7.8033e-09 0 NaN NaN 1 NaN 8.7183e-08 0.0000e+00
grain_number class_number subgrain_number centre_x centre_y radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image grain_endpoints grain_junctions total_branch_lengths grain_width_mean num_crossings avg_crossing_confidence min_crossing_confidence num_mols writhe_string total_contour_length average_end_to_end_distance
0 0 1 0 3.5579e-08 9.1031e-08 3.9431e-09 2.5631e-08 1.6016e-08 1.6680e-08 9.1991e-10 2.6422e-09 1.5338e-09 1.5341e-09 1.0543e-24 6.8721e-16 1.3198e-15 2.0539e-08 5.0379e-08 1.0347e-15 4.0769e-01 above 5.0379e-08 2.0539e-08 minicircle_small 1 1 8.5729e-08 9.5493e-09 1 NaN NaN 2 6.7087e-08 9.4020e-09
1 1 1 0 7.2337e-08 1.2413e-07 6.8951e-09 2.7188e-08 1.6272e-08 1.6263e-08 9.0630e-10 2.4586e-09 1.6144e-09 1.6264e-09 1.0352e-24 6.3645e-16 1.5931e-15 2.0174e-08 5.1212e-08 1.0332e-15 3.9394e-01 above 5.1262e-08 2.0174e-08 minicircle_small 0 0 7.3054e-08 7.6878e-09 0 NaN NaN 1 NaN 5.7989e-08 0.0000e+00
2 2 1 0 7.7556e-08 1.2702e-07 9.9461e-09 2.3654e-08 1.7561e-08 1.8364e-08 9.0641e-10 2.1066e-09 1.5939e-09 1.5493e-09 1.1192e-24 7.2236e-16 1.5462e-15 3.3592e-08 4.1496e-08 1.3940e-15 8.0952e-01 above 4.4405e-08 3.2528e-08 minicircle_small 0 0 1.0331e-07 7.8754e-09 0 NaN NaN 1 NaN 8.5725e-08 0.0000e+00
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
image_size_x_m image_size_y_m image_area_m2 image_size_x_px image_size_y_px image_area_px2 grains_number_above grains_per_m2_above grains_number_below grains_per_m2_below rms_roughness
image
minicircle_small 1.2646e-07 1.2646e-07 1.5993e-14 64 64 4096 0 0.0000e+00 1 6.2526e+13 6.8208e-10
centre_x centre_y radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image
grain_number
0 3.2366e-08 1.4036e-08 7.7690e-10 1.2272e-08 6.4301e-09 6.4170e-09 -3.7937e-10 -2.1207e-10 -2.4477e-10 -2.6816e-10 -3.0364e-26 1.1323e-16 3.0066e-16 7.0841e-09 2.1505e-08 1.5234e-16 3.2941e-01 below 2.2092e-08 7.0841e-09 minicircle_small
grain_number class_number subgrain_number centre_x centre_y radius_min radius_max radius_mean radius_median height_min height_max height_median height_mean volume area area_cartesian_bbox smallest_bounding_width smallest_bounding_length smallest_bounding_area aspect_ratio threshold max_feret min_feret image
0 0 1 0 1.8534e-08 4.3677e-08 7.7690e-10 1.2272e-08 6.4301e-09 6.4170e-09 -3.7937e-10 -2.1207e-10 -2.4477e-10 -2.6816e-10 -3.0364e-26 1.1323e-16 3.0066e-16 7.0841e-09 2.1505e-08 1.5234e-16 3.2941e-01 below 2.2092e-08 7.0841e-09 minicircle_small
Loading
Loading