Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DeepSlice
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Harry Carey
DeepSlice
Commits
25b47406
Unverified
Commit
25b47406
authored
4 months ago
by
Harry Carey
Committed by
GitHub
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Delete ds.py
parent
b7fc97a4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ds.py
+0
-23
0 additions, 23 deletions
ds.py
with
0 additions
and
23 deletions
ds.py
deleted
100644 → 0
+
0
−
23
View file @
b7fc97a4
from
DeepSlice
import
DSModel
species
=
"
mouse
"
# available species are 'mouse' and 'rat'
Model
=
DSModel
(
species
)
folderpath
=
"
examples/example_brain/GLTa/
"
# here you run the model on your folder
# try with and without ensemble to find the model which best works for you
# if you have section numbers included in the filename as _sXXX specify this :)
Model
.
predict
(
folderpath
,
ensemble
=
True
,
section_numbers
=
True
)
# This is an optional stage if you have damaged sections, or hemibrains they may negatively effect the propagation for the entire dataset
# simply set the bad sections here using a string which is unique to those each section you would like to label as bad. DeepSlice will
# not include it in the propagation and instead it will infer its position based on neighbouring sections.
Model
.
set_bad_sections
(
bad_sections
=
[
"
_s094
"
,
"
s199
"
])
# If you would like to normalise the angles (you should)
Model
.
propagate_angles
()
# To reorder your sections according to the section numbers
Model
.
enforce_index_order
()
# alternatively if you know the precise spacing (ie; 1, 2, 4, indicates that section 3 has been left out of the series) Then you can use
# Furthermore if you know the exact section thickness in microns this can be included instead of None
# if your sections are numbered rostral to caudal you will need to specify a negative section_thickness
Model
.
enforce_index_spacing
(
section_thickness
=
None
)
# now we save which will produce a json file which can be placed in the same directory as your images and then opened with QuickNII.
Model
.
save_predictions
(
folderpath
+
"
MyResults
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment