Open xaioffff opened 2 years ago
@xaioffff check your dataset structure. You should have something like this:
mvtec
│ readme.
│ license.txt
│
└─── bottle
│ │ readme.txt
│ │ lisence.txt
│ │
│ └─── ground_truth
│ | └─── broken_large
│ | └─── broken_small
│ | └─── contamination
│ |
| └─── train
| | └─── good
| | | 000.png
| | | ...
│ |
| └─── test
| | └─── broken_large
| | | | 000.png
| | | | ...
| | └─── broken_small
| | | | 000.png
| | | | ...
| | └─── contamination
| | | | 000.png
| | | | ...
| | └─── good
| | | | 000.png
| | | | ...
└─── cable
| ...
└─── zipper
In the command, you should specify the path like this ./mvtec/bottle/train
. It trains model for each class separately/
@xaioffff check your dataset structure. You should have something like this: mvtec │ readme. │ license.txt │ └─── bottle │ │ readme.txt │ │ lisence.txt │ │ │ └─── ground_truth │ | └─── broken_large │ | └─── broken_small │ | └─── contamination │ | | └─── train | | └─── good | | | 000.png | | | ... │ | | └─── test | | └─── broken_large | | | | 000.png | | | | ... | | └─── broken_small | | | | 000.png | | | | ... | | └─── contamination | | | | 000.png | | | | ... | | └─── good | | | | 000.png | | | | ... └─── cable | ... └─── zipper
In the command, you should specify the path like this
./mvtec/bottle/train
. It trains model for each class separately/ I looked at the previous question.It has also been changed in accordance with your requirements.But it still doesn't solve the problem.Am I using python3.6, cuda10.1?I use Windows
@xaioffff check your dataset structure. You should have something like this: mvtec │ readme. │ license.txt │ └─── bottle │ │ readme.txt │ │ lisence.txt │ │ │ └─── ground_truth │ | └─── broken_large │ | └─── broken_small │ | └─── contamination │ | | └─── train | | └─── good | | | 000.png | | | ... │ | | └─── test | | └─── broken_large | | | | 000.png | | | | ... | | └─── broken_small | | | | 000.png | | | | ... | | └─── contamination | | | | 000.png | | | | ... | | └─── good | | | | 000.png | | | | ... └─── cable | ... └─── zipper
In the command, you should specify the path like this
./mvtec/bottle/train
. It trains model for each class separately/ I looked at the previous question.It has also been changed in accordance with your requirements.But it still doesn't solve the problem.Am I using python3.6, cuda10.1?I use Windows
I see. The reason may be in os differences.
In dataset object we have
if self.train_images and self.mode == 'train': self.images = glob(self.train_images + "/*")
where "/*"
may not work in Windows. You can change that part, use pathlib
instead of glob
, it may solve your issue
The result of the required substitution is I really appreciate your patience。But I'm very sorry it still doesn't work
Is the raw data set format,I'm confused. What's the reason?I hope I can give you some solutions in your busy schedule.