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
Thank you for your kind tutorial and framework.
I'm trying to create a new model with my dataset, but "ValueError: all input arrays must have the same shape" occurs in metrics.py. I printed out the output of that part, and I found the input list to np.stack is incorrect. Some lists have 1 element and others have 3 elements. The number of former lists is same as "good" label data. Maybe I mistaked around this part. How can I fix this problem?
The text was updated successfully, but these errors were encountered:
I thought the metrics.py outputs the zero matrices, so I changed the shape at the point where error is occured.
I added following part in compute_pixelwise_retrieval_metrics() of metrics.py, and the model training has been started:
if isinstance(ground_truth_masks, list):
for i in range(len(ground_truth_masks)):
if len(ground_truth_masks[i]) == 3:
ground_truth_masks[i] = [ground_truth_masks[i][0]]
This is just a quick fix, so the discussion about metrics.py will help you, I think.
And accutually, I want to know the correct solution about this problem :-)
Hey, I had a similar issue when trying to train on my own dataset. The masks of the mvtec dataset are grayscale images, whereas the masks I created by myself had 3 channels/were RGB images. You have to save your masks as grayscale images aswell, and this error shouldn't occurr anymore.
Thank you for your kind tutorial and framework.
I'm trying to create a new model with my dataset, but "ValueError: all input arrays must have the same shape" occurs in metrics.py. I printed out the output of that part, and I found the input list to np.stack is incorrect. Some lists have 1 element and others have 3 elements. The number of former lists is same as "good" label data. Maybe I mistaked around this part. How can I fix this problem?
The text was updated successfully, but these errors were encountered: