facebookresearch / facebookresearch/dynadiff
Eval mIoU script doesn't work
- Dominant language
- Python
- Stars
- 47
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
```
Traceback (most recent call last):
File "eval_miou.py", line 25, in
main()
File "eval_miou.py", line 21, in main
miou = compute_miou(preds, trues, eval_res=512)
File "/home/lgn/PhD/neural_ip/metrics/mIOU/evaluate_img_gen.py", line 84, in compute_miou
pred_lbl = openLbl(pred_lbl_path)
File "/home/lgn/PhD/neural_ip/metrics/mIOU/evaluate_img_gen.py", line 31, in openLbl
lbl = Image.open(str(path))
File "/opt/conda/lib/python3.7/site-packages/PIL/Image.py", line 2975, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory '/tmp/tmp1ou914di/preds/pred_label/pred_0.png'
```
[Script](https://github.com/facebookresearch/dynadiff/blob/b8d1f84a054826c2cea28a44beb2aac5a1839b8c/metrics/mIOU/evaluate_img_gen.py#L80) tries to open file in **pred_labels_pred** directory but script above doesn't put anything to that directory.
Your key metric **mIoU** couldn't be calculated using your code.
Contributor guide
Research direction
Start with eval_miou.py and metrics/mIOU/evaluate_img_gen.py around line 80, then trace how prediction labels are produced and where compute_miou looks for them. Reproduce the FileNotFoundError and align the script's output location with the path used by the evaluator. Done means the evaluation runs and reports mIoU without the missing-file error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100