Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add our weights for raft_small on C+T #5076

Merged
merged 2 commits into from
Dec 9, 2021

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Dec 9, 2021

Towards #4644

This PR adds our own pre-trained weights for Raft-small. They are a bit better on the clean pass of sintel, about the same on the final pass, and a tiny bit better on kitti.

I also updated the META info of the raft-large models regarding kitti, which I forgot to do before.

with --pretrained

(raft) ➜  vision git:(raft_small_weights_ours) ✗ torchrun --nproc_per_node 8 --nnodes 1 references/optical_flow/train.py --val-dataset kitti --batch-size 10 --model raft_small --dataset-root ../downloads --pretrained
Kitti val epe: 8.0209	1px: 0.5074	3px: 0.7333	5px: 0.7963	per_image_epe: 7.5978	f1: 25.2369

with --weights Raft_Small_Weights.C_T_V2

(raft) ➜  vision git:(raft_small_weights_ours) ✗ torchrun --nproc_per_node 8 --nnodes 1 references/optical_flow/train.py --val-dataset kitti --batch-size 10 --model raft_small --dataset-root ../downloads --weights Raft_Small_Weights.C_T_V2

Kitti val epe: 8.0209	1px: 0.5074	3px: 0.7333	5px: 0.7963	per_image_epe: 7.5978	f1: 25.2369

cc @datumbox

@facebook-github-bot
Copy link

facebook-github-bot commented Dec 9, 2021

💊 CI failures summary and remediations

As of commit d8431fc (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI lint_python_and_config Lint Python code and config files 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@NicolasHug NicolasHug added module: models other if you have no clue or if you will manually handle the PR in the release notes and removed cla signed labels Dec 9, 2021
@NicolasHug NicolasHug mentioned this pull request Dec 9, 2021
12 tasks
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @NicolasHug. I left one comment but stamping to unblock.

@@ -46,6 +48,8 @@ class Raft_Large_Weights(WeightsEnum):
"recipe": "https://github.com/pytorch/vision/tree/main/references/optical_flow",
"sintel_train_cleanpass_epe": 1.3822,
"sintel_train_finalpass_epe": 2.7161,
"kitti_train_per_image_epe": 4.5118,
"kitti_train_f1-all": 16.0679,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity is this the standard F1 score?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, it's a kitti-specific metric, I saw it in different papers (and it's what they report in the leaderboards)

"f1": ((epe > 3) & (relative_epe > 0.05)).float().mean().item() * 100,

torchvision/prototype/models/optical_flow/raft.py Outdated Show resolved Hide resolved
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
@NicolasHug NicolasHug merged commit 2508a02 into pytorch:main Dec 9, 2021
facebook-github-bot pushed a commit that referenced this pull request Dec 17, 2021
Summary: Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>

Reviewed By: fmassa

Differential Revision: D33184991

fbshipit-source-id: be9145a25eed78c1b6b0153e089997387ff93843
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/default cla signed module: models other if you have no clue or if you will manually handle the PR in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants