Low fps imageai

Hello,
I’m fresh on Jetson nano, so if simmillar topic was before, just send me link.
Machine: Jetson Nano B01
Envoirment:
Tensorflow 1.15.5, ImageAi 2.1.5

I attached messages in log file.
I guess that problem is in gpu memory, how to solve it?
Tensorflow is starting ca 1minute, after it 3-rd and next frames have ca 1,4 fps

Code below:

from imageai.Detection import VideoObjectDetection
import os

execution_path = os.getcwd()

detector = VideoObjectDetection()

#detector.setModelTypeAsYOLOv3()
detector.setModelTypeAsTinyYOLOv3()
#detector.setModelTypeAsRetinaNet()

output_video = None
detector.setModelPath( os.path.join(execution_path , “yolo-tiny.h5”))
#detector.setModelPath( os.path.join(execution_path , “yolo.h5”))
#detector.setModelPath( os.path.join(execution_path , “resnet50_coco_best_v2.0.1.h5”))

detector.loadModel(detection_speed=“normal”)

custom = detector.CustomObjects(person=True, bicycle=True, motorcycle=True)

video_path = detector.detectCustomObjectsFromVideo(custom_objects=custom, input_file_path=os.path.join(execution_path, “Belgrade.mp4”),
output_file_path=os.path.join(execution_path, “dark1_bgr”)
, frames_per_second=20, log_progress=True, display_percentage_probability=False, display_object_name=False)

print(video_path)

log.txt (242.3 KB)

Hi,

Have you maximized the device performance first?

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

Thanks.

Hi,
Yes, I have,
I’ve made fresh installation with latest JetPack and imageai 2.1.6+TF2.4.0 and FPS is much worst.
I’ve found something like this:

Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 416 MB memory)
and
Failed to find bogomips or clock in /proc/cpuinfo; cannot determine CPU frequency

Hi,

You can clarify that if the bottleneck is from data IO or not with tegratstats.

$ sudo tegrastats

In general, we expect a third-party library to have at least 70% GPU utilization.
If not, there is some dependency (ex. input) to prevent the app using all the GPU resource.

Thanks.