flutter_torch_mobile icon indicating copy to clipboard operation
flutter_torch_mobile copied to clipboard

Better performace through dart:FFI

Open dvagala opened this issue 1 year ago • 0 comments

Hey, I've made an example here of how to add C++ LibTorch to Flutter and call it directly through dart:FFI. My measures suggest that the inference is significantly faster than using the method channels, and moreover, all the C++ code can be shared with Android and iOS, so no duplication anymore.

I'm just posting it here if anyone wants to play with it or make a PR.

dvagala avatar Mar 13 '23 09:03 dvagala