Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YOLOV11 Cannot calculate the reshape tensor #211

Open
ZXB6 opened this issue Oct 17, 2024 · 0 comments
Open

YOLOV11 Cannot calculate the reshape tensor #211

ZXB6 opened this issue Oct 17, 2024 · 0 comments

Comments

@ZXB6
Copy link

ZXB6 commented Oct 17, 2024

same way succeed in YOLOV8, but failed in YOLOV11

from ultralytics import YOLO
model = YOLO('yolo11n.pt')
model.export(
                imgsz=192,
                format='tflite',
                # simplify=True,
                opset=14,
                int8=True
)

using yolo11n_integer_quant.tflite

    std::unique_ptr<tflite::Interpreter>  interpreter;;
    std::unique_ptr<tflite::FlatBufferModel> model =   tflite::FlatBufferModel::BuildFromFile(model_test.c_str());
    tflite::ops::builtin::BuiltinOpResolver resolver;
    tflite::InterpreterBuilder(*model.get(), resolver)(&interpreter);

    tflite::tools::ToolParams params;
    ProvidedDelegateList providers(&params);
    providers.AddAllDelegateParams();
    params.Set<std::string>("external_delegate_path", "/usr/lib/libvx_delegate.so", 1);
    interpreter->SetAllowFp16PrecisionForFp32(true);
    memcpy(input_tensor->data.f, inputImg.ptr<float>(0), HEIGHT*WIDTH*3* sizeof(float));
    auto start = std::chrono::high_resolution_clock::now();
    interpreter->Invoke();

image

@ZXB6 ZXB6 changed the title Cannot calculate the reshape tensor YOLOV11 Cannot calculate the reshape tensor Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant