Fahimeh Orvati Nia commited on
Commit
c60418f
·
1 Parent(s): 95cc07c
Files changed (1) hide show
  1. sorghum_pipeline/pipeline.py +5 -0
sorghum_pipeline/pipeline.py CHANGED
@@ -55,6 +55,11 @@ class SorghumPipeline:
55
 
56
  # Load image
57
  img = Image.open(single_image_path)
 
 
 
 
 
58
  plants = {
59
  "demo": {
60
  "raw_image": (img, Path(single_image_path).name),
 
55
 
56
  # Load image
57
  img = Image.open(single_image_path)
58
+ try:
59
+ frames = getattr(img, 'n_frames', 1)
60
+ except Exception:
61
+ frames = 1
62
+ logger.info(f"Loaded input: path={single_image_path}, mode={img.mode}, size={img.size}, frames={frames}")
63
  plants = {
64
  "demo": {
65
  "raw_image": (img, Path(single_image_path).name),