Replies: 1 comment 7 replies
-
Hello, Then, SAHI will perform a prediction on each of the images. For me, as seen in the below image, the whole prediction which beforehand took ~300sec now took place in 10.992 seconds and 8.34 it/s resulting in ~120 ms average image prediction time. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I currently experience performance issues using a Mask R-CNN trained with detectron2 on custom data.
My goal is to use SAHI, because the image resolution is around 4000x6000px. So my preferation would be to use it with a slice width&height of 640px.
result = predict( model_type='detectron2', model_path=model_path, model_config_path=config_path, model_device="cuda:0", source="predict_images/testData/img01.jpg", no_standard_prediction=True, slice_height=640, slice_width=640, overlap_height_ratio=0.2, overlap_width_ratio=0.2, verbose=2, novisual=True )
Using this configuration, the prediction takes about 120 seconds for a number of 120 slices.
If I slice the pictures using sahi and pass the folder containing the images to predict, the whole prediction process of all 120 images just takes 12(!) seconds instead of 120. This time consumption of 12s would be optimal for my use-case.
Is anyone aware of the possible issue and if so, knows a solution to it, I would be happy to hear about it.
Otherwise, if you need additional information please let me know.
If it helps, I can provide the output of cProfiler.
Beta Was this translation helpful? Give feedback.
All reactions