IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.16k stars 234 forks source link

df.interpolate().ewm(com=ewm_col).mean().plot( #72

Closed Jing-W98 closed 2 years ago

Jing-W98 commented 2 years ago

I run util/plot_utils.py to visualize training logs, and the following error is reported: python util/plot_utils.py ✹ ✭ iter 000: mAP@50= 84.2, score=0.556, f1=0.863 iter latest: mAP@50= 89.2, score=0.726, f1=0.899 Traceback (most recent call last): File "util/plot_utils.py", line 115, in plot_logs([Path('./logs/DINO/R50-MS4_sampled_0811_pre_b4')]) File "util/plot_utils.py", line 65, in plot_logs df.interpolate().ewm(com=ewm_col).mean().plot( File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper return func(*args, kwargs) File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/frame.py", line 10720, in interpolate kwargs, File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/generic.py", line 6908, in interpolate kwargs, File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 377, in interpolate return self.apply("interpolate", kwargs) File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 327, in apply applied = getattr(b, f)(**kwargs) File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/internals/blocks.py", line 1369, in interpolate new_values = values.fillna(value=fill_value, method=method, limit=limit) File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/arrays/_mixins.py", line 219, in fillna value, method, validate_scalar_dict_value=False File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/util/_validators.py", line 372, in validate_fillna_kwargs method = clean_fill_method(method) File "/home/research/wangjing/anaconda3/envs/pytorch/lib/python3.7/site-packages/pandas/core/missing.py", line 120, in clean_fill_method raise ValueError(f"Invalid fill method. Expecting {expecting}. Got {method}") ValueError: Invalid fill method. Expecting pad (ffill) or backfill (bfill). Got linear

SlongLiu commented 2 years ago

It seems the bug comes from the df.fill with time fields. You can refer to https://github.com/IDEA-opensource/DAB-DETR/issues/44 for more details. A simple way to solve this is to remove the time fields in the log dict.

Jing-W98 commented 2 years ago

Thank you, I solved the problem.