Comments (4)
Oh hey there thanks for the interest! I don't have experience with wasm but I'm all for trying it if we can add node and browser support.
Before we go down that path though, have you tried the bezkrovny version (see options)?
Another option that will dramatically improve performance is downsampling the image.
For the test images you are using I usually get the opposite results on a similar machine (reading the image taking ~100ms and ssim about ~30ms) any chance these values are flipped?
from ssim.
I tried options, but the performance on the iPhone 8 plus is still not good. If bezkrovny is set, the accuracy is not enough, so it is necessary to improve the performance. Can we try wasm or webgl, and switch conveniently?
const { mssim, performance } = ssim(imageData, this.imageData, {
ssim: 'fast',
downsample: 'fast',
});
console.log(`SSIM: ${mssim} (${performance}ms)`);
- iPhone 8 Plus
- image width and height: 320px
- time: 50ms~
from ssim.
Got it, yeah bezkrovny won't give the same results although it correlates fairly well with perceived image degradation as well, I talked about it more here
I've updated the node/web example to give more info on the different performances and generated values.
But if you've tried all this and the results and / or performance are still not good enough, let's look into other options.
I had tried a previous implementation with typed arrays but didn't get the performance boost I expected (operations were faster but array creation was slower so it ended up being a wash) so I suspect webgl won't give us much gain but I could be wrong.
Would you be interested in taking a crack at a wasm or webgl implementation? I can help but I don't have enough bandwidth to own the full implementation at the moment
from ssim.
I've looked into adding wasm support but it'd take more time than I can dedicate to it right now.
I'll go ahead and close this issue since I'm not actively working on it but feel free to create a new one if you want to take a crack it
from ssim.
Related Issues (20)
- yarn add ssim.js error HOT 2
- Image size too small for 5 scale IW-SSIM evaluation HOT 2
- The automated release is failing 🚨 HOT 44
- Image Diffs (Definitely a bug with Bezkrovny) HOT 9
- Add Contributor License Agreement HOT 3
- Add Integer RGB calculation HOT 9
- Reimplement WeberSSIM to avoid unnecessary division, branching, and rounding. HOT 1
- downsample is producing NaN values when used with rgb2grayInteger. HOT 2
- Question about the ImageData type HOT 3
- RangeError: Invalid array length HOT 9
- Uncaught RangeError: Invalid array length HOT 3
- Dependency Dashboard HOT 1
- Argument of type 'Promise<unknown>' is not assignable to parameter of type 'ImageData'. HOT 3
- g HOT 1
- I am sorry but I do not know How to do it? The example is an old version? HOT 4
- Can't use the package HOT 7
- Does it implements the CW-SSIM variant? HOT 2
- bmp tests might be incorrect HOT 2
- Error generating SSIM [RangeError: Array size is not a small enough positive integer.] HOT 5
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 ssim.