An Android project containing image recognition and object detection models.

Last update: Feb 26, 2022

pytorch_android_kotlin

An Android project containing image recognition and object detection models.

Users can input images into the deep learning model by taking photos, opening photo albums, and real-time previews on the Android side. After the calculation on the Android side is completed, the model will output the prediction result and show it to the user.

Like it?

star

ToDo

  • UI Language
    • Chinese
    • English
  • Semantic segmentation
  • Faster computing speed
  • Mobile gpu support

Released

Demo released Download

Getting Started

Software

Android Studio

Pytorch 1.9

Dependency

Add the dependency --- build.gradle(Module)

// CameraX
implementation "androidx.camera:camera-camera2:1.0.0"
implementation "androidx.camera:camera-lifecycle:1.0.0"
implementation "androidx.camera:camera-view:1.0.0-alpha24"

// pytorch_android
implementation 'org.pytorch:pytorch_android_lite:1.9.0'
implementation 'org.pytorch:pytorch_android_torchvision:1.9.0'

// https://github.com/leinardi/FloatingActionButtonSpeedDial
implementation "com.leinardi.android:speed-dial:3.2.0"

// https://github.com/guolindev/PermissionX
implementation 'com.permissionx.guolindev:permissionx:1.4.0'

Enable ViewBinding --- build.gradle(Module)

android {
    ...
    buildFeatures {
        viewBinding true
    }
}

Using androidx libraries --- gradle.properties

android.useAndroidX=true
android.enableJetifier=true

Build and enjoy it

Demo

Image recognition

Test image

Take photo

From album

Real time

Object detection

Test image

Take photo

From album

Real timeļ¼ˆFrame rate is low, improvingļ¼‰

License

This project is licensed under the Apache-2.0 License

Reference project

Part of the code comes from the Pytorch android-demo-app

GitHub

https://github.com/imzyp/pytorch_android_kotlin
You might also like...

Auto Scrolling Image Pager with Pager Indicator and Text

Auto Scrolling Image Pager with Pager Indicator and Text

AutoImageFlipper Auto Scrolling Image Pager with Pager Indicator and Text Note: It works only on Apps which are using AndroidX dependencies, if you're

Mar 25, 2022

Phimp.me Android Phimp.me is an Android image editor app

Phimp.me Android Phimp.me is an Android image editor app

Phimp.me Android Phimp.me is an Android image editor app that aims to replace proprietary photographing and image apps on smart phones. It offers feat

Aug 6, 2022

some android image filters

some android image filters

android-image-filter some android image filters in some filter, I use NDK to implement to make it more efficient Setup Install Android NDK and properl

Jul 12, 2022

An android image compression library.

An android image compression library.

Compressor Compressor is a lightweight and powerful android image compression library. Compressor will allow you to compress large photos into smaller

Aug 8, 2022

A simple image cropping library for Android.

A simple image cropping library for Android.

SimpleCropView The SimpleCropView is an image cropping library for Android. It simplifies your code for cropping image and provides an easily customiz

Aug 15, 2022

An image resizing library for Android

An image resizing library for Android

Resizer Inspired by zetbaitsu's Compressor, Resizer is a lightweight and easy-to-use Android library for image scaling. It allows you to resize an ima

Jul 2, 2022

Simple android image popup Library

Simple android image popup Library

Android Image Popup Show image as a popup on a click event or any event. Simply set the image as drawable and thats it!!!. And also you can set width,

Mar 22, 2022

Image loading library for Android

Image Loader Image loader library for Android. Deprecated. See Glide. Features Image transformations Automatic memory and storage caching Ability to l

May 28, 2022

Image Cropping Library for Android, optimised for Camera / Gallery.

Image Cropping Library for Android, optimised for Camera / Gallery.

Image Cropping Library for Android, optimised for Camera / Gallery.

Aug 16, 2022
[Android] Screenshot detection while user using your app
[Android] Screenshot detection while user using your app

[Android] Screenshot detection while user using your app

Aug 4, 2022
This is an Image slider with swipes, Here we used Volley to Image load URL's from JSON! Here we make it very easy way to load images from Internet and We customized the description font style(OpenSans).

ImageSliderWithSwipes This is an Image slider with swipes, Here we used Volley to load URL's from JSON! Here we make it very easy way to load images f

May 31, 2021
Library to save image locally and shows options to open and share !

Image Save and Share Library to save image locally and shows options to open and share ! Download Demo APK from HERE Kindly use the following links to

Apr 18, 2022
Android widget for cropping and rotating an image.
Android widget for cropping and rotating an image.

Cropper The Cropper is an image cropping tool. It provides a way to set an image in XML and programmatically, and displays a resizable crop window on

Aug 3, 2022
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon
Customizable Android full screen image viewer for Fresco library supporting

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate

Aug 12, 2022
Dali is an image blur library for Android. It contains several modules for static blurring, live blurring and animations.
Dali is an image blur library for Android. It contains several modules for static blurring, live blurring and animations.

Dali Dali is an image blur library for Android. It is easy to use, fast and extensible. Dali contains several modules for either static blurring, live

Aug 11, 2022
An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.

An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.

Aug 9, 2022
Pixel Boom is a Java-based Android software, featuring image super-resolution and colorization

Pixel Boom is a Java-based Android software, featuring image super-resolution and colorization.

Jul 3, 2022
Add curve at bottom of image views and relative layouts.
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Jul 27, 2022
Add curve at bottom of image views and relative layouts.
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Mar 24, 2021