Comments (2)
Thanks a lot, @mdejeans.
In such way with a variable number of parametrizable crop positions, we can do other crops that centered ones, even if we only need one crop.
So here is the discussion about how to do realize such function and. Is creating a new function into image/ops/ the best way to do or it would be easier if ResizeWithCropOrPadOp can take crop parameters as arguments?
Having the flexibility to choose crop positions other than the center is definitely useful. We can add an optional parameter to ResizeWithCropOrPadOp
for this purpose.
So, if I want to extract 4 crops of a 200x200 image I can set cropsPosition=[[0,0], [0,100], [100,0], [100, 100]], cropHeight = 100 and cropWidth = 100 to get a TensorImage of shape (4, 100, 100, 3).
It might not be possible, because the image processing pipeline and TensorImage are designed for a single image only, https://github.com/am15h/tflite_flutter_helper/blob/master/lib/src/image/tensor_image.dart#L90.
For multiple crops, a better option might be to manually create multiple TensorImage objects processed using different parameters in ResizeWithCropOrPadOp
.
Please let me know what you think about this.
from tflite_flutter_helper.
Having the flexibility to choose crop positions other than the center is definitely useful. We can add an optional parameter to ResizeWithCropOrPadOp for this purpose.
Please see PR #16 to an answer for this part of the feature
from tflite_flutter_helper.
Related Issues (20)
- Precondition failed when attempting to use with a custom model HOT 11
- ImageProcessor doesn't run through tasks during process since 0.3.1 HOT 1
- install.bat didn't wok
- squeeze TensorBuffer HOT 1
- preNormalize question
- LateInitializationError: Field 'bertQuestionAnswerer' has not been initialized. HOT 1
- Model doesnt work with the plugin HOT 1
- Flutter 3.0 error HOT 16
- Error when trying to use the tflite_flutter_helper package HOT 12
- Cannot find an axis to label. A valid axis to label should have size larger than 1.
- Issue while debugging.
- Bad state: failed precondition with TensorFlow Lite v3
- Get exception in interpreter.run
- not compatible with ffi 2.0.1. HOT 2
- TensorLabel from tflite file
- _outputBuffer.getDoubleList() value is low
- Could not find method compile() for arguments
- Upgrade Image Dependency HOT 15
- Why package is DISCONTINUED ? HOT 5
- A value of type 'ImageData?' can't be assigned to a variable of type 'List<int>?'. Try changing the type of the variable, or casting the right-hand type to 'List<int>?'
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 tflite_flutter_helper.