Project-MONAI / Project-MONAI/MONAI

Refactor perceptual loss so that it can be used offline (regardless of the network_type)

Đang mở
#8,317 1 bình luận 1 reaction 1 người được giao Xem trên GitHub

@virginiafdez đang làm issue này rồi.

Từ ngày 28/1/2025.

Ngôn ngữ chính
Python
Star
8.7k
Fork
1.6k
Merge trung bình
5 ngày 1 giờ
Pull request đã merge (30 ngày)
20

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.