You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I was working on private datasets to train patchcore model.
I am using Anomalib v1.1.2 and i have this issue were i use Folder function to load the data as you can see in here
`
from anomalib.data.image.folder import Folder as BaseFolder
folder_datamodule = BaseFolder(
name=folder_name,
root=dataset_root,
normal_dir="good",
task=TaskType.CLASSIFICATION, # Change task to DETECTION since we don't have masks
image_size=(224, 224), # Image resizing
train_transform=transform_training,
num_workers=8,
train_batch_size=1, #
eval_batch_size=1, #
val_split_mode=ValSplitMode.FROM_TEST,
val_split_ratio=0.5,
seed=5
# test_split_mode=TestSplitMode.NONE
)
folder_datamodule.setup()
i do 2 different runs one using the following code # dataloader_tra = folder_datamodule.train_dataloader()
# dataloader_val = folder_datamodule.val_dataloader()
# dataloader_tes = folder_datamodule.test_dataloader()
# engine.fit(train_dataloaders=dataloader_tra,
# val_dataloaders=dataloader_val
# , model=model) while the second uses another the following code
engine.fit(datamodule=folder_datamodule
, model=model)
`
everything rest stays the same. however i get different results in terms of Meadata.json in terms of threshold values imagethreshold and pixel threshold
so the main difference that i pass the full folder_data module to the fit function while in the other case i pass he dataloaders that should be coming from the folderdata module. However it doesnot make sense that I am getting different results. Can you please help me?? The idea is that the application that I am working on, i am running the crops on the fly so i cannot save them on the disk to use the Folder functionality.
I am supposed that I only have good data and i want to use it to calculate the threshold in the train folder,
is it possible that the DataModule gives access to search in the test folder and finds the data and use it to calculate the threshold thats why i get better results in that case ???
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was working on private datasets to train patchcore model.
I am using Anomalib v1.1.2 and i have this issue were i use Folder function to load the data as you can see in here
`
from anomalib.data.image.folder import Folder as BaseFolder
folder_datamodule = BaseFolder(
name=folder_name,
root=dataset_root,
normal_dir="good",
task=TaskType.CLASSIFICATION, # Change task to DETECTION since we don't have masks
image_size=(224, 224), # Image resizing
train_transform=transform_training,
num_workers=8,
train_batch_size=1, #
eval_batch_size=1, #
val_split_mode=ValSplitMode.FROM_TEST,
val_split_ratio=0.5,
seed=5
# test_split_mode=TestSplitMode.NONE
)
folder_datamodule.setup()
i do 2 different runs one using the following code
# dataloader_tra = folder_datamodule.train_dataloader()# dataloader_val = folder_datamodule.val_dataloader()
# dataloader_tes = folder_datamodule.test_dataloader()
# engine.fit(train_dataloaders=dataloader_tra,
# val_dataloaders=dataloader_val
# , model=model)
while the second uses another the following code
engine.fit(datamodule=folder_datamodule
, model=model)
`
everything rest stays the same. however i get different results in terms of Meadata.json in terms of threshold values imagethreshold and pixel threshold
so the main difference that i pass the full folder_data module to the fit function while in the other case i pass he dataloaders that should be coming from the folderdata module. However it doesnot make sense that I am getting different results. Can you please help me?? The idea is that the application that I am working on, i am running the crops on the fly so i cannot save them on the disk to use the Folder functionality.
I am supposed that I only have good data and i want to use it to calculate the threshold in the train folder,
is it possible that the DataModule gives access to search in the test folder and finds the data and use it to calculate the threshold thats why i get better results in that case ???
Cheers,
Enis
Beta Was this translation helpful? Give feedback.
All reactions