Open brooklynsdeath opened 8 months ago
Use python and check your code .
sorry i wanted to know about the post processing steps, it is getting difficult for me to get the correct output from tensor
if (status != kTfLiteOk)
{
std::cout << "\nFailed to run inference!!\n";
exit(1);
}
// For YOLOv8
out_dims = interpreter->tensor(model_output)->dims;
int out_batch = out_dims->data[0];
int _out_row = out_dims->data[2];
int _out_colum = out_dims->data[1];
std::cout << "YOLO Model Output Shape:[" << out_batch << "][" << _out_row
<< "][" << _out_colum << "]\n";
std::vector<std::vector
my o/p YOLO Model Output Shape:[1][8400][7]
I have swapped this beacuse yolov8 deos opposite to yolov5
yolov8
int _out_row = out_dims->data[2];
int _out_colum = out_dims->data[1];
yolov5
int _out_row = out_dims->data[1];
int _out_colum = out_dims->data[2];
I believe this should work . did u checked it ? https://github.com/ajithkumarmcw/Yolo_tflite_detection/blob/main/src/yolov5_tflite.cpp#L239-L266
yes i have performed it, and still i'm not getting any better results // yolov5 has an output of shape (batchSize, 25200, 85) (Num classes + box[x,y,w,h] + confidence[c]) // yolov8 has an output of shape (batchSize, 84, 8400) (Num classes + box[x,y,w,h])
that is why i changed it
could u share u r post processing code and output image the only postprocessing step is apply cv2.nms and write the bounding boxes to image .
Hi, Can you please share the source code implemented for yolov8 tflite cpp ? thanks in advance,
Either share your mail id or send mail to inocajith21.5@gmail.com
@ajithkumarmcw thanks for your reply, I've sent email, please take a look. For yolov5 tflite, I have successfully built and run https://github.com/muhammedakyuzlu/yolov5-tflite-cpp. However, this repo built done but could not run. Return core-dump after load model successfully. Thanks for any advice.
In case if any one faces issue kindly use this repo https://github.com/ajithvcoder/Yolov8_CPP_Inference_tflite
How did you do the preprocessing for yolov8? can you provide the code snippet after the invoke is called or tell me what changes need to be done.