YihongSun / Bayesian-Amodal

[CVPR 2022] Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model
MIT License
22 stars 4 forks source link

Implementing the script "run_experiment.py" prints the "error" message for every image #1

Closed ZainabOuardirhi closed 1 year ago

ZainabOuardirhi commented 2 years ago

Greeting,

First of all thank you for sharing this project. I would like to ask you if you may have any idea about the reason why the run_experiment script prints the error messages, I tried to look if it was because of the libraries versions, but I personally don't think so...

Screenshot 2022-05-12 104034

When I went to check the source code, i find that the error is comming from the eval_performance function, specifically from the following part

Screenshot 2022-05-12 104405

Thanks in advance!

YihongSun commented 2 years ago

Hello,

Since the model's forward pass is wrapped in a try block, the actual error that caused the exception handling is suppressed.

Try to run the following code outside of the try block to see what the error message is.

with torch.no_grad():
    pred_scores, ... = net(org_x=input_tensor...)

Please let me know if there is anything else that I can help with!

ZainabOuardirhi commented 2 years ago

It worked! Thank you @YihongSun . I also tried to train the model using the train_CompNet script. Using the value 1 as the table number it gave me the following error : Screenshot 2022-05-13 151232

Using the value 2 it gave me the following error : Screenshot 2022-05-13 151417

Are these errors due to lack of data?

Thanks again.

DonaldKam commented 1 year ago

I am encountering the same problem. It has not yet been addressed.

YihongSun commented 1 year ago

Sorry for the delay response.

For the error in TABLE_NUM = 1, it seems that there is an error loading the model that was catched by the try block. The error occurred on this line. Without properly loading the model, model.fg_models[i] stayed unchanged as None.

For the error in TABLE_NUM = 2, the models were successfully loaded (shown in Dim Reduction - cyclist: (21, 25) --> (19,21)), but there is an error with the keyword gt_alignment. This is a version issue with Net.py and to resolve this, simply remove the parameter gt_alignment=input_alighnments.

Sorry for the inconvenience and hope it helps!