Tomonori12 / BBox-Label-Tool-Python3.x

5 stars 8 forks source link

Can't Load images #1

Open FPRM opened 7 years ago

FPRM commented 7 years ago

Hello. I'm facing some issues to open images to label

What i'm doing.

  1. Create folder /source/path/Images/002 capt1

  2. Put some images in the folder (a bunch of several extensions tied such as ".jpg - .jpeg - .JPEG" capt2

  3. load BBox-label GUI and enter "2" as Image Dir capt3

  4. Lauch labeling with "Load" button

Expected behavior:

Open images in folder to begin labeling

What i get:

Nothing. Python traceback gives me following --> "No .JPEG images found in the specified dir!"

related function is.

`def loadDir(self, dbg = False): if not dbg: s = self.entry.get() self.parent.focus() self.category = int(s) else: s = r'/home/flo-linux/Documents/Sources/YOLOV2/darknet/Bboxlabel/BBox-Label-Tool/RESULTTRAIN' "## if not os.path.isdir(s): "## tkMessageBox.showerror("Error!", message = "The specified dir doesn't exist!") "## return

get image list

    self.imageDir = os.path.join(r'./Images', '%03d' %(self.category))
    self.imageList = glob.glob(os.path.join(self.imageDir, '*.jpg'))
    self.imageList.sort()  # By Tomonori12
    if len(self.imageList) == 0:
        print('No .JPEG images found in the specified dir!')  # By Tomonori12
        return`

Can you help me to solve the issue

pedrombmachado commented 5 years ago

@FPRM apply the following fix to line 136 self.imageList = glob.glob(os.path.join(self.imageDir, '.jpg')) + glob.glob(os.path.join(self.imageDir, '.jpeg')) \

Bhaskar476 commented 4 years ago

(base) bhaskar@bhaskar-HP-1000-Notebook-PC:~/BBox-Label-Tool$ python main.py File "main.py", line 136 print 'No .JPEG images found in the specified dir!' ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('No .JPEG images found in the specified dir!')?

I am facing this problems. How could I solve this problem?