shyam671 / Mask2Anomaly-Unmasking-Anomalies-in-Road-Scene-Segmentation

[ICCV'23 Oral] Unmasking Anomalies in Road-Scene Segmentation
46 stars 8 forks source link

run the run.sh error (Anomaly Inference) #2

Closed zhengnx0906 closed 11 months ago

zhengnx0906 commented 11 months ago

I try to downlowd this picture to test the inference (!wget https://www.epfl.ch/labs/cvlab/wp-content/uploads/2019/10/road_anomaly_gt_contour.jpg ), and i change its name.

And then i run this commend (CUDA_VISIBLE_DEVICES=1 python anomaly_utils/anomaly_inference.py --input '/home/znx/Mask2Anomaly-Unmasking-Anomalies-in-Road-Scene-Segmentation/*.jpg' --config-file '/home/znx/Mask2Anomaly-Unmasking-Anomalies-in-Road-Scene-Segmentation/configs/cityscapes/semantic-segmentation/anomaly_inference.yaml' ).

The error occurs.(> to CPU due to CUDA OOM [09/27 16:57:46 detectron2]: /home/znx/src/Mask2Anomaly/1.jpg: finished in 13.62s Traceback (most recent call last): File "anomaly_utils/anomaly_inference.py", line 225, in ood_out = anomaly_scores[ood_mask] IndexError: too many indices for array: array is 4-dimensional, but 5 were indexed )

How can i solve it?

shyam671 commented 11 months ago

Can you try with more than one image.

chaiyanyu commented 10 months ago

Hi, thanks for your googd job! i encountered same problem, when i try with 3 pictures, The error occurs: Traceback (most recent call last): File "/root/Mask2Anomaly-Unmasking-Anomalies-in-Road-Scene-Segmentation-main/anomaly_utils/anomaly_inference.py", line 228, in ood_out = anomaly_scores[ood_mask] IndexError: too many indices for array: array is 4-dimensional, but 5 were indexed

Do you have any other solutions? Any help is greatly appreciated.