cfchen-duke / ProtoPNet

This code package implements the prototypical part network (ProtoPNet) from the paper "This Looks Like That: Deep Learning for Interpretable Image Recognition" (to appear at NeurIPS 2019), by Chaofan Chen* (Duke University), Oscar Li* (Duke University), Chaofan Tao (Duke University), Alina Jade Barnett (Duke University), Jonathan Su (MIT Lincoln Laboratory), and Cynthia Rudin (Duke University) (* denotes equal contribution).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Augmenting Dataset

EoinKenny opened this issue · comments

For anyone recreating this, the img_aug.py file should have this alteration to work correctly I think?

for i in range(len(folders)):
    fd = folders[i]
    tfd = '../../../../' + target_folders[i]

when before it was...

for i in range(len(folders)):
    fd = folders[i]
    tfd = target_folders[i]

@EoinKenny Yes, thank you! Just ran into this.

I tried this way. However, it didn't work. Could you please provide more information? Is your path the same as the author's? Thanks in advance.

Strange it didn't work, yeah everything else in my experiment was the same as the repo. I would imagine the problem is your environment path or something like that. This should work I think. Sorry don't think I can help anymore than that.

tfd = "../../"+target_folders[i]

works for me