SiamFC-PyTorch icon indicating copy to clipboard operation
SiamFC-PyTorch copied to clipboard

img_buffer = self.txn.get(key) in dataset.py ,this line

Open cymisyourdad opened this issue 5 years ago • 3 comments

the img_buffer get none, I dont know why it cant get the value of the img_buffer

cymisyourdad avatar Aug 08 '19 01:08 cymisyourdad

I print the result of the img_buffer, it shows None

cymisyourdad avatar Aug 08 '19 01:08 cymisyourdad

I also meet this problem "the img_buffer get none",the sub-function "imread" in dataset.py,the img_buffer get key but whit None

zj717754140 avatar Sep 27 '19 00:09 zj717754140

Just ignore lmdb. Replace imread function of dataset.py with

    def imread(self, path):
        # key = hashlib.md5(path.encode()).digest()
        # img_buffer = self.txn.get(key)
        # img_buffer = np.frombuffer(img_buffer, np.uint8)
        # img = cv2.imdecode(img_buffer, cv2.IMREAD_COLOR)
        img = cv2.imread(path, cv2.IMREAD_COLOR)
        return img

ihciah avatar Oct 14 '19 06:10 ihciah