WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13.18k stars 4.17k forks source link

Any successful attempt to get a working TFLite model? #1450

Open dsbyprateekg opened 1 year ago

dsbyprateekg commented 1 year ago

Hi,

Has anybody successfully integrated YOLOv7 exported to the TFLite model in the android app? I am facing the following error while loading the exported TFLite model in the android studio-

The input tensor should have dimensions 1 x height x width x 3. Got 1 x 3 x 640 x 640. Caused by: java.lang.IllegalArgumentException: Error occurred when initializing ObjectDetector: The input tensor should have dimensions 1 x height x width x 3. Got 1 x 3 x 640 x 640.

com.facebook.jni.CppException: Could not run 'aten::empty_strided' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit [https://fburl.com/ptmfixes](https://www.freelancer.in/users/l.php?url=https:%2F%2Ffburl.com%2Fptmfixes&sig=d3bc2bcefbb40daab5ae099d5bcfad0edc726661adfa6688e895398de8502f8e) for possible resolutions. 'aten::empty_strided' is only available for these backends: [CPU, Vulkan, BackendSelect, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradLazy, AutogradXPU, AutogradMLC].

The android studio version I am using is Android Studio Electric Eel | 2022.1.1

asparmar14 commented 1 year ago

same here. If found any solution then do let me know