Add option to choose the loss function in `compute_loss` function.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🚀 The feature
In the compute loss function, giou_loss is used to calculate the loss by default see here, but now as CIOU and DIOU loss functions are added to torchvision, maybe we could let the user choose in between the loss functions
cc @datumbox @YosuaMichael, @NicolasHug,
Motivation, pitch
This gives little more freedom to the user to choose between the loss functions.
Alternatives
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in torchvision/models/detection/fcos.py, especially the compute_loss function and the default giou_loss use around the linked lines. Read how CIOU and DIOU are exposed in torchvision before deciding how the choice should be represented. Done means users can select among the available loss functions while preserving GIoU as the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100