Comments (4)
Hi @arianaa30 ,
Is the input static image/single image? If yes, you need to use SelfieSegmenterOptions.SINGLE_IMAGE_MODE
instead of SelfieSegmenterOptions.STREAM_MODE
.
I tested by https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart amd on Pixel 3 device with 1440x1080 input resolution, the inference is around ~30ms.
Please note that the 1st inference is higher than the following inferences because of initialization task and OS scheduling. Streaming mode's latency might be stable, you can also check it from the streaming activities in https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart
from mlkit.
Hmm is there anything weird with the above script that makes it slower on a higher-end phone? It's doing the same thing as vision-quikstart. It's from your online tutorial.
In my case, I have to pass every frame of video as media.Image to this module to process, and get the results back. So it's considered a STREAM mode eventually.
from mlkit.
I didn't see any issue in the code snippet you provided above.
Probably one thing to note is that please make sure the result task runs immediately after it's created. If there're other pending tasks, the calculated latency might be high as the result task might be waiting to be run
from mlkit.
@SilverDestiny per your suggestion, in my code snippet above, I'm running the result task immediately after it's created right? Is this what you mean?
Task<SegmentationMask> result =
segmenter.process(image)
.addOnSuccessListener(
new OnSuccessListener<SegmentationMask>() {
from mlkit.
Related Issues (20)
- [Feature request] Recommended hardware and USB Camera HOT 1
- [Feature request] The state of MLKit DigitalInkRecognition
- [Bug report] InputImage.getBitmapInternal() returns null HOT 1
- [Feature request] MLKit and Apple’s new Privacy Manifests HOT 2
- Issues in frame processing using MLKit
- [Feature request] Disable logging for DigitalInkRecognition on iOS HOT 4
- MLKit running on GPU? HOT 7
- Request for Swift Package Manager support HOT 1
- Upcoming third-party SDK requirements in iOS:Support App Privacy Manifest HOT 1
- [Feature request] Request for adding face mesh textures
- [Bug report] Progress only updates when the download is complete
- [Bug report] iOS swift: 'Background Task was created 30 seconds ago' warning when downloading model
- [Bug report] Title for the bug
- [Feature request] GS1 Databar barcodes support
- [Bug report] MLKit.Initialize() fails with NullPointerException on Android 11 devices HOT 1
- [Bug report] App crash on Pose Detection HOT 3
- Cannot build iOS vision App HOT 1
- MLKit change logs? HOT 3
- Function isnt taking the path HOT 5
- Requesting pages 50 but able to scan only 10 pages HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlkit.