Project-MONAI / Project-MONAI/MONAI
Refactor perceptual loss so that it can be used offline (regardless of the network_type)
@virginiafdez 已经在做这个了。
开始于 2025年1月28日。
- 主要语言
- Python
- 星标
- 8.7k
- 派生
- 1.6k
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 20
描述
I am trying to instance perceptual loss in an environment where there would not be access to the internet. With torchvision models, I typically instance the network with pretrained = False and then manually load the weights I have saved somewhere local previously.
With the PerceptualLoss class it is difficult to do so; whereas some network_types seem to have this functionality (e.g. resnet50 has a pretrained=False) types like medicalnet seem to need to access the internet all the time for (1) defining the network (resnet.py is downloaded from the hub) (2) getting and loading the weights.
Describe the solution you'd like
- Standardisation of how the different networks are instanced / defined
- Unique pretrained parameter or pretrained_path allowing users to load the weigths from an alternative local path.
Describe alternatives you've considered
Hardcode perceptual_loss to allow for this for the specific network_type I am using
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。