flowattack
flowattack copied to clipboard
Scores of provided patches
Hi, thank you for the code.
I tried to run test_path.py
on the provided patch with a tiny change on the code in order to the patch as png instead of the format you dump during training.
The change is here, instead of patch = torch.load(args.patch_path)
im = np.array(Image.open(args.patch_path).convert('RGB'))
im = np.transpose(im, (2, 0, 1))
im = np.expand_dims(im, 0)
patch = torch.from_numpy(im)
patch_init = torch.from_numpy(im)
I tested both Upatch1 and Upatch2 on FlowNetC with this command: python test_patch.py --patch_path patches/Upatch.png --flownet FlowNetC
. (--name is not important)
- upatch1:
epe, adv_epe, cos_sim, adv_cos_sim
14.5157, 34.4716, 0.8562, 0.4959
- upatch2:
epe, adv_epe, cos_sim, adv_cos_sim
14.5157, 17.7255, 0.8562, 0.7827
These patches sizes don't have any comparison with the paper and it seems that they don't affect much the prediction. Especially because here the flow inside the patch is considered, while it shouldn't. Can you please provide your results or more patches with the smallest and biggest dimensions?
Thank you!
- Please update the argparse here. Most of the help-strings are the same)
- Here your hard-coded paths to kitti
Edit:
I ran the test on the second patch with --ignore_flow_mask=true
:
epe, adv_epe, cos_sim, adv_cos_sim
14.5157, 17.7804, 0.8562, 0.7963
Oh, here you need to take care of the normalization of the patch properly. The raw saves of the patch are already normalized. The effect should be such that you are pasting the normalized patch on the image.
As far as I remember, the patch is normalized to [-1, 1]. This loading of png-image of the patch normalizes it to [0,1]. That should be taken care of.