(self)
| 125 | self.frame.rowconfigure(4, weight=1) |
| 126 | |
| 127 | def loadDir(self): |
| 128 | #self.txtDir = os.path.join(self.entry.get()) |
| 129 | self.rank_pkl = load_pickle(self.entry.get()+'.pkl') |
| 130 | self.queries = list(self.rank_pkl.keys()) |
| 131 | #self.txtList = glob.glob(os.path.join(self.txtDir, '*.txt')) |
| 132 | #self.txtList.sort(key=lambda x: int(x[-10:-4])) |
| 133 | |
| 134 | if len(self.queries) == 0: |
| 135 | print('No text file found in the specified directory!') |
| 136 | return |
| 137 | |
| 138 | # default: the 1st image in the collection |
| 139 | self.cur = 1 |
| 140 | self.total = len(self.queries) |
| 141 | |
| 142 | self.loadImage() |
| 143 | print('%d images loaded' % self.total) |
| 144 | |
| 145 | def loadImage(self): |
| 146 |
nothing calls this directly
no test coverage detected