I am running the yolov4 object detection model on raspberry pi 4B and jetson nano. I have to record the inference time. I am using 12 images for evaluation. how can I record the inference time of this model? Is there anything for calculating the inference time?
Asked
Active
Viewed 94 times
0
-
`time.time()` ?.... – Alberto Sinigaglia Jul 26 '22 at 17:45
-
Consider using [timeit](https://stackoverflow.com/questions/8220801/how-to-use-timeit-module/48302720) – Rodrigo Laguna Aug 08 '22 at 12:05
1 Answers
0
Hi @MohammadSaeidAnwar you can use the time module at the starting of your inference before you start your inference to calculate the time. For example
import time
begin = time.time()
time.sleep(5)
end = time.time()
print('Time taken:', round(end-begin, 2))
#output:Time taken: 5.01
Thankyou.