-
Notifications
You must be signed in to change notification settings - Fork 657
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
Check if mask_dir
is available for segmentation task in Folder
data
#1277
Check if mask_dir
is available for segmentation task in Folder
data
#1277
Conversation
mask_dir
check to Folder
datamask_dir
is available for segmentation task in Folder
data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this may be a bit too restricting, and could cause problems with the Lightning inferencer. The following is actually a valid dataset config, which will successfully train a model:
dataset:
name: folder
format: folder
root: ./datasets/MVTec/bottle
normal_dir: train/good
abnormal_dir: null
normal_test_dir: null
mask_dir: null
extensions: null
task: segmentation
train_batch_size: 32
eval_batch_size: 32
num_workers: 8
image_size: 256 # dimensions to which images are resized (mandatory)
center_crop: null # dimensions to which images are center-cropped after resizing (optional)
normalization: imagenet # data distribution to which the images will be normalized: [none, imagenet]
transform_config:
train: null
eval: null
test_split_mode: none # options: [from_dir, synthetic]
test_split_ratio: 0.2 # fraction of train images held out testing (usage depends on test_split_mode)
val_split_mode: none # options: [same_as_test, from_test, synthetic]
val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode)
This is the config that one would use to train a model when no anomalous images are available, and then use that model for segmentation during inference.
As a solution, maybe we could check if the val_split_mode
is NONE
.
…dd-mask-dir-check-to-folder-data
…dd-mask-dir-check-to-folder-data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
This PR checks if
mask_dir
is set for segmentation tasks .Fixes Unable read the mask image #1212
Changes
Checklist