Fixed opening of image
Will need to be changed again if more than one trajectory is evaluated Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
289275e82f
commit
83919b1464
|
@ -63,9 +63,8 @@ def save_ssd_train_images(images: Union[np.ndarray, Sequence[str]], labels: np.n
|
||||||
instances = labels[i]
|
instances = labels[i]
|
||||||
if type(train_image) is str:
|
if type(train_image) is str:
|
||||||
with Image.open(train_image) as _image:
|
with Image.open(train_image) as _image:
|
||||||
image = _image
|
train_image = np.array(_image, dtype=np.uint8)
|
||||||
else:
|
image = Image.fromarray(train_image)
|
||||||
image = Image.fromarray(train_image)
|
|
||||||
image.save(f"{output_path}/"
|
image.save(f"{output_path}/"
|
||||||
f"{custom_string}train_image{str(i).zfill(nr_digits)}.png")
|
f"{custom_string}train_image{str(i).zfill(nr_digits)}.png")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue