c4dt / predictive-maintenance

An experiment to decentralize learning for predictive maintenance
0 stars 0 forks source link

Experiment: switch dataset to MVTec #4

Closed lanterno closed 1 year ago

lanterno commented 1 year ago

General notes:

I've added the dataset as well to make it easier for others to start testing ASAP. To view only the code changes in this PR, you can switch to the commits tab, and only view the first commit.

Experiment results:

The MVTec dataset only contains valid/correct data, that's why once the classifier was trained only on one class, it was everything on the test dataset as belonging to that dataset.

This is why we can make the judgement that is dataset is not suitable for bi/multi-category training-based classification.

The test accuracy I got was about 27% and when I looked further into what was happening, I found that all data was inferred to be class "Good"

Note: However, this code might still be useful as an additional reference for how to use a different dataset.

You can see that there's a major difference between how the two different datasets were loaded. That's because PyTorch has a built-in loader for the CIFAR10 dataset, but not for the MVTec dataset. That's why I also included the dataset within the PR.

Closes #2

lanterno commented 1 year ago

@ineiti I added a link to the dataset and linted the code with black and isort