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

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
36 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
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
1 change: 1 addition & 0 deletions topostats/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ grainstats:
extract_height_profile: true # Extract height profiles along maximum feret of molecules
disordered_tracing:
run: true # Options : true, false
class_index: 1 # The class index to trace. This is the class index of the grains.
min_skeleton_size: 10 # Minimum number of pixels in a skeleton for it to be retained.
pad_width: 1 # Pixels to pad grains by when tracing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pad with could be added into grains? or (see later disordered tracing comment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

mask_smoothing_params:
Expand Down
Loading
Loading