Project-MONAI / Project-MONAI/MONAI

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

Offen
#8,317 1 Kommentar 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@virginiafdez arbeitet bereits daran.

Seit 28.1.2025.

Vorherrschende Sprache
Python
Sterne
8.7k
Forks
1.6k
Ø Merge
5 T. 1 Std.
Gemergte PRs (30 T.)
20

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.