Pangoraw / PaDiM

:dolphin: Re-implementation of PaDiM and code for the article "Weakly Supervised Detection of Marine Animals in High Resolution Aerial Images"
https://arxiv.org/abs/2011.08785
MIT License
27 stars 4 forks source link

y_true==1 in PadimSVDD #14

Open rishabh-akridata opened 4 months ago

rishabh-akridata commented 4 months ago

Hi @Pangoraw, What is y_true ==1 in PadimSVDD? Does 1 mean normal image and 0 means anomalous?

pbar = tqdm(range(n_epochs))
        for epoch in pbar:
            loss_epoch = 0
            n_batches = 0
            for imgs, y_true in train_dataloader:
                imgs = imgs.to(self.device)
                y_true = y_true.to(self.device)
                imgs = imgs[y_true == 1]

                optimizer.zero_grad()

Thanks

Pangoraw commented 4 months ago

i am not sure if padimsvdd.pretrain() does something actually. I don't recall exactly what it meant to do

rishabh-akridata commented 4 months ago

Okay.