YOLOv11-cls.pt for image classification processing time per image fluctuates

Hey guys, I ran into an issue while using YOLOv11-cls.pt for image classification. I noticed that when the YOLO model keeps processing images non-stop at high speed, the processing time per image gradually increases over time. For example, it starts at 8ms per image, then after a while (the timing varies), it jumps to 13ms per image, and eventually goes up to around 45ms. But it’s not consistent—sometimes it drops back to 8ms or 13ms and cycles again. I monitored the CPU, memory, GPU usage, and temperature, but nothing stands out. Any idea why the processing time per image fluctuates so much?

Can you provide the code you’re using, and the output after running this command in terminal: yolo checks?

code:from ultralytics import YOLO

if _name_ == ‘_main_’:
model = YOLO(‘runs/classify/train4/weights/best.pt’) # select your model.pt path
while True:
model.predict(source=‘datasets/pics’, imgsz=640, device=0, save=False, verbose=True)

checks:

……

……
image 6/88 D:\Desktop\explosionClassify\datasets\pics\111 (14).bmp: 640x640 normal 0.98, explosion 0.02, 8.2ms
image 7/88 D:\Desktop\explosionClassify\datasets\pics\111 (15).bmp: 640x640 normal 0.98, explosion 0.02, 8.3ms
image 8/88 D:\Desktop\explosionClassify\datasets\pics\111 (16).bmp: 640x640 normal 0.98, explosion 0.02, 8.2ms
image 9/88 D:\Desktop\explosionClassify\datasets\pics\111 (17).bmp: 640x640 normal 0.98, explosion 0.02, 8.2ms
image 10/88 D:\Desktop\explosionClassify\datasets\pics\111 (18).bmp: 640x640 normal 0.98, explosion 0.02, 8.5ms
image 11/88 D:\Desktop\explosionClassify\datasets\pics\111 (19).bmp: 640x640 normal 0.98, explosion 0.02, 8.1ms
image 12/88 D:\Desktop\explosionClassify\datasets\pics\111 (2).bmp: 640x640 normal 0.98, explosion 0.02, 8.7ms
image 13/88 D:\Desktop\explosionClassify\datasets\pics\111 (20).bmp: 640x640 normal 0.98, explosion 0.02, 8.8ms
image 14/88 D:\Desktop\explosionClassify\datasets\pics\111 (21).bmp: 640x640 normal 0.98, explosion 0.02, 9.1ms
image 15/88 D:\Desktop\explosionClassify\datasets\pics\111 (22).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 16/88 D:\Desktop\explosionClassify\datasets\pics\111 (23).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 17/88 D:\Desktop\explosionClassify\datasets\pics\111 (24).bmp: 640x640 normal 0.98, explosion 0.02, 14.1ms

……

……

image 1/88 D:\Desktop\explosionClassify\datasets\pics\111 (1).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 2/88 D:\Desktop\explosionClassify\datasets\pics\111 (10).bmp: 640x640 normal 0.98, explosion 0.02, 13.8ms
image 3/88 D:\Desktop\explosionClassify\datasets\pics\111 (11).bmp: 640x640 normal 0.98, explosion 0.02, 13.5ms
image 4/88 D:\Desktop\explosionClassify\datasets\pics\111 (12).bmp: 640x640 normal 0.98, explosion 0.02, 13.7ms
image 5/88 D:\Desktop\explosionClassify\datasets\pics\111 (13).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 6/88 D:\Desktop\explosionClassify\datasets\pics\111 (14).bmp: 640x640 normal 0.98, explosion 0.02, 13.7ms
image 7/88 D:\Desktop\explosionClassify\datasets\pics\111 (15).bmp: 640x640 normal 0.98, explosion 0.02, 14.3ms
image 8/88 D:\Desktop\explosionClassify\datasets\pics\111 (16).bmp: 640x640 normal 0.98, explosion 0.02, 14.5ms
image 9/88 D:\Desktop\explosionClassify\datasets\pics\111 (17).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 10/88 D:\Desktop\explosionClassify\datasets\pics\111 (18).bmp: 640x640 normal 0.98, explosion 0.02, 14.5ms
image 11/88 D:\Desktop\explosionClassify\datasets\pics\111 (19).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 12/88 D:\Desktop\explosionClassify\datasets\pics\111 (2).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 13/88 D:\Desktop\explosionClassify\datasets\pics\111 (20).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 14/88 D:\Desktop\explosionClassify\datasets\pics\111 (21).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 15/88 D:\Desktop\explosionClassify\datasets\pics\111 (22).bmp: 640x640 normal 0.98, explosion 0.02, 13.7ms
image 16/88 D:\Desktop\explosionClassify\datasets\pics\111 (23).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 17/88 D:\Desktop\explosionClassify\datasets\pics\111 (24).bmp: 640x640 normal 0.98, explosion 0.02, 14.5ms
image 18/88 D:\Desktop\explosionClassify\datasets\pics\111 (25).bmp: 640x640 normal 0.98, explosion 0.02, 13.7ms
image 19/88 D:\Desktop\explosionClassify\datasets\pics\111 (26).bmp: 640x640 normal 0.98, explosion 0.02, 13.7ms
image 20/88 D:\Desktop\explosionClassify\datasets\pics\111 (27).bmp: 640x640 normal 0.98, explosion 0.02, 13.5ms
image 21/88 D:\Desktop\explosionClassify\datasets\pics\111 (28).bmp: 640x640 normal 0.98, explosion 0.02, 13.4ms
image 22/88 D:\Desktop\explosionClassify\datasets\pics\111 (29).bmp: 640x640 normal 0.98, explosion 0.02, 13.5ms
image 23/88 D:\Desktop\explosionClassify\datasets\pics\111 (3).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 24/88 D:\Desktop\explosionClassify\datasets\pics\111 (30).bmp: 640x640 normal 0.98, explosion 0.02, 13.8ms
image 25/88 D:\Desktop\explosionClassify\datasets\pics\111 (31).bmp: 640x640 normal 0.98, explosion 0.02, 14.3ms
image 26/88 D:\Desktop\explosionClassify\datasets\pics\111 (32).bmp: 640x640 normal 0.98, explosion 0.02, 13.4ms
image 27/88 D:\Desktop\explosionClassify\datasets\pics\111 (33).bmp: 640x640 normal 0.98, explosion 0.02, 14.0ms
image 28/88 D:\Desktop\explosionClassify\datasets\pics\111 (34).bmp: 640x640 normal 0.98, explosion 0.02, 14.2ms
image 29/88 D:\Desktop\explosionClassify\datasets\pics\111 (35).bmp: 640x640 normal 0.98, explosion 0.02, 13.8ms
image 30/88 D:\Desktop\explosionClassify\datasets\pics\111 (36).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 31/88 D:\Desktop\explosionClassify\datasets\pics\111 (37).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 32/88 D:\Desktop\explosionClassify\datasets\pics\111 (38).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 33/88 D:\Desktop\explosionClassify\datasets\pics\111 (39).bmp: 640x640 normal 0.98, explosion 0.02, 13.4ms
image 34/88 D:\Desktop\explosionClassify\datasets\pics\111 (4).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 35/88 D:\Desktop\explosionClassify\datasets\pics\111 (40).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 36/88 D:\Desktop\explosionClassify\datasets\pics\111 (41).bmp: 640x640 normal 0.98, explosion 0.02, 13.6ms
image 37/88 D:\Desktop\explosionClassify\datasets\pics\111 (42).bmp: 640x640 normal 0.98, explosion 0.02, 14.1ms
image 38/88 D:\Desktop\explosionClassify\datasets\pics\111 (43).bmp: 640x640 normal 0.98, explosion 0.02, 72.9ms
image 39/88 D:\Desktop\explosionClassify\datasets\pics\111 (44).bmp: 640x640 normal 0.98, explosion 0.02, 123.7ms
image 40/88 D:\Desktop\explosionClassify\datasets\pics\111 (45).bmp: 640x640 normal 0.98, explosion 0.02, 56.7ms
image 41/88 D:\Desktop\explosionClassify\datasets\pics\111 (46).bmp: 640x640 normal 0.98, explosion 0.02, 57.5ms
image 42/88 D:\Desktop\explosionClassify\datasets\pics\111 (47).bmp: 640x640 normal 0.98, explosion 0.02, 56.5ms
image 43/88 D:\Desktop\explosionClassify\datasets\pics\111 (48).bmp: 640x640 normal 0.98, explosion 0.02, 56.9ms
image 44/88 D:\Desktop\explosionClassify\datasets\pics\111 (49).bmp: 640x640 normal 0.98, explosion 0.02, 56.9ms
image 45/88 D:\Desktop\explosionClassify\datasets\pics\111 (5).bmp: 640x640 normal 0.98, explosion 0.02, 56.9ms
image 46/88 D:\Desktop\explosionClassify\datasets\pics\111 (50).bmp: 640x640 normal 0.98, explosion 0.02, 48.4ms
image 47/88 D:\Desktop\explosionClassify\datasets\pics\111 (51).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
image 48/88 D:\Desktop\explosionClassify\datasets\pics\111 (52).bmp: 640x640 normal 0.98, explosion 0.02, 48.3ms
image 49/88 D:\Desktop\explosionClassify\datasets\pics\111 (53).bmp: 640x640 normal 0.98, explosion 0.02, 48.3ms
image 50/88 D:\Desktop\explosionClassify\datasets\pics\111 (54).bmp: 640x640 normal 0.98, explosion 0.02, 49.5ms
image 51/88 D:\Desktop\explosionClassify\datasets\pics\111 (55).bmp: 640x640 normal 0.98, explosion 0.02, 48.6ms
image 52/88 D:\Desktop\explosionClassify\datasets\pics\111 (56).bmp: 640x640 normal 0.98, explosion 0.02, 48.6ms
image 53/88 D:\Desktop\explosionClassify\datasets\pics\111 (57).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
image 54/88 D:\Desktop\explosionClassify\datasets\pics\111 (58).bmp: 640x640 normal 0.98, explosion 0.02, 48.4ms
image 55/88 D:\Desktop\explosionClassify\datasets\pics\111 (59).bmp: 640x640 normal 0.98, explosion 0.02, 49.5ms
image 56/88 D:\Desktop\explosionClassify\datasets\pics\111 (6).bmp: 640x640 normal 0.98, explosion 0.02, 48.3ms
image 57/88 D:\Desktop\explosionClassify\datasets\pics\111 (60).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
image 58/88 D:\Desktop\explosionClassify\datasets\pics\111 (61).bmp: 640x640 normal 0.98, explosion 0.02, 49.1ms
image 59/88 D:\Desktop\explosionClassify\datasets\pics\111 (62).bmp: 640x640 normal 0.98, explosion 0.02, 48.4ms
image 60/88 D:\Desktop\explosionClassify\datasets\pics\111 (63).bmp: 640x640 normal 0.98, explosion 0.02, 48.4ms
image 61/88 D:\Desktop\explosionClassify\datasets\pics\111 (64).bmp: 640x640 normal 0.98, explosion 0.02, 48.6ms
image 62/88 D:\Desktop\explosionClassify\datasets\pics\111 (65).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
image 63/88 D:\Desktop\explosionClassify\datasets\pics\111 (66).bmp: 640x640 normal 0.98, explosion 0.02, 48.8ms
image 64/88 D:\Desktop\explosionClassify\datasets\pics\111 (67).bmp: 640x640 normal 0.98, explosion 0.02, 49.2ms
image 65/88 D:\Desktop\explosionClassify\datasets\pics\111 (68).bmp: 640x640 normal 0.98, explosion 0.02, 48.6ms
image 66/88 D:\Desktop\explosionClassify\datasets\pics\111 (69).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
image 67/88 D:\Desktop\explosionClassify\datasets\pics\111 (7).bmp: 640x640 normal 0.98, explosion 0.02, 48.8ms
image 68/88 D:\Desktop\explosionClassify\datasets\pics\111 (70).bmp: 640x640 normal 0.98, explosion 0.02, 48.4ms
image 69/88 D:\Desktop\explosionClassify\datasets\pics\111 (71).bmp: 640x640 normal 0.98, explosion 0.02, 48.7ms
image 70/88 D:\Desktop\explosionClassify\datasets\pics\111 (72).bmp: 640x640 normal 0.98, explosion 0.02, 48.6ms
image 71/88 D:\Desktop\explosionClassify\datasets\pics\111 (73).bmp: 640x640 normal 0.98, explosion 0.02, 48.3ms
image 72/88 D:\Desktop\explosionClassify\datasets\pics\111 (74).bmp: 640x640 normal 0.98, explosion 0.02, 48.5ms
……

……

Can you run the terminal command yolo checks with your Python virtual environment active, and share the output as well? It should help provide some additional context. Based on what you’ve shared so far, there could be a few reasons this occurs:

  1. Since the images are on disk, it could just be due to slow read speeds from storage.
  2. It’s entirely possible background services or programs startup or run and slow things down.
  3. I haven’t worked with .bmp files a lot for inference, but you might try converting to JPEG and rerun inference to see if that helps, since .bmp images tend to be quite large.