Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRCNN Particle Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AVT-FVT
public
MRCNN Particle Detection
Commits
29602224
Commit
29602224
authored
1 year ago
by
ssibirtsev
Browse files
Options
Downloads
Patches
Plain Diff
Update process_automated_droplet.py
parent
c552ba8a
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
classes/droplet/process_automated_droplet.py
+7
-1
7 additions, 1 deletion
classes/droplet/process_automated_droplet.py
with
7 additions
and
1 deletion
classes/droplet/process_automated_droplet.py
+
7
−
1
View file @
29602224
...
...
@@ -43,6 +43,8 @@ name_result_file = "test"
weights_path
=
r
"
test
"
# MRCNN model name to find in "Mask_R_CNN\models\
weights_name
=
r
"
test
"
# file format of images
file_format
=
"
jpg
"
# save n-th result image
save_nth_image
=
1
# pixel size in [µm/px]. To read from Sopat log file enter pixelsize = 0
...
...
@@ -152,6 +154,7 @@ if cluster is False:
IMAGE_CROP
=
image_crop
CONTRAST
=
contrast
CONFIDENCE
=
confidence
FILE_FORMAT
=
file_format
else
:
import
argparse
# Parse command line arguments
...
...
@@ -167,6 +170,8 @@ else:
help
=
'
Weights path to find in Mask_R_CNN\models
'
)
parser
.
add_argument
(
'
--weights_name
'
,
required
=
True
,
help
=
'
Choose Neuronal Network / Epoch to find in Mask_R_CNN\models
'
)
parser
.
add_argument
(
'
--file_format
'
,
required
=
True
,
help
=
''
)
parser
.
add_argument
(
'
--masks
'
,
required
=
False
,
type
=
str
,
default
=
"
False
"
,
help
=
'
Generate detection masks?
'
)
...
...
@@ -237,6 +242,7 @@ else:
DATASET_DIR
=
os
.
path
.
join
(
ROOT_DIR
,
"
datasets/input
"
,
args
.
dataset_path
)
SAVE_DIR
=
os
.
path
.
join
(
ROOT_DIR
,
"
datasets/output
"
,
args
.
save_path
)
EXCEL_DIR
=
os
.
path
.
join
(
SAVE_DIR
,
args
.
name_result_file
+
'
.xlsx
'
)
FILE_FORMAT
=
args
.
file_format
if
args
.
detect_oval_droplets
==
"
True
"
:
DETECT_OVAL_DROPLETS
=
True
elif
args
.
detect_oval_droplets
==
"
False
"
:
...
...
@@ -286,7 +292,7 @@ Path(SAVE_DIR).mkdir(parents=True, exist_ok=True)
### mean pixel detectieren
images_mean_pixel
=
[]
images_path
=
glob
.
glob
(
DATASET_DIR
+
"
/*.
jpg
"
)
images_path
=
glob
.
glob
(
DATASET_DIR
+
"
/*.
"
+
FILE_FORMAT
)
for
img_path
in
images_path
:
img
=
cv2
.
imread
(
img_path
)
img
=
cv2
.
cvtColor
(
img
,
cv2
.
COLOR_BGR2RGB
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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