misc/convert_folders_to_coco_format.py [114:130]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            try:
                width, height = PIL.Image.open(classimage).size
                if PIL.Image.open(classimage).mode != 'RGB':
                    PIL.Image.open(classimage).convert('RGB').save(classimage)
                # Reading the image should come first so a failed load does not
                # mess up the IDs
                max_im_id = max_im_id + 1
                max_an_id = max_an_id + 1
                next_im_id = max_im_id
                next_an_id = max_an_id
                if random.random() < val_prob:
                    js = val_js
                else:
                    js = train_js
                # Make link to the image in the output folder
                target_file = os.path.join(target_folder, os.path.split(classimage)[1])
                if not os.path.exists(target_file):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



misc/make_species_extended.py [115:131]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            try:
                width, height = PIL.Image.open(classimage).size
                if PIL.Image.open(classimage).mode != 'RGB':
                    PIL.Image.open(classimage).convert('RGB').save(classimage)
                # Reading the image should come first so a failed load does not
                # mess up the IDs
                max_im_id = max_im_id + 1
                max_an_id = max_an_id + 1
                next_im_id = max_im_id
                next_an_id = max_an_id
                if random.random() < val_prob:
                    js = val_js
                else:
                    js = train_js
                # Make link to the image in the output folder
                target_file = os.path.join(target_folder, os.path.split(classimage)[1])
                if not os.path.exists(target_file):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



