Comments (2)
Ok - so more testing! The biggest contributor seems to be the chunk size.
Each time it writes a slice, an area is read from the image with a z depth == the highest amount of downsampling (i.e. 8 for the example above). This is made much more efficient by using a chunk size in z == the highest amount of downsampling. (before I was using a chunk size of 1 in z)
Using bigger chunks in xy is also more efficient for read/write times.
With a chunk size of (8, 128, 128), the times can be improved to around:
Converted image in 1.1741 seconds
Converted image in 2.0598 seconds
Converted image in 2.0561 seconds
Converted image in 2.2036 seconds
Converted image in 2.2064 seconds
Converted image in 2.2776 seconds
Converted image in 2.4407 seconds
Converted image in 2.4372 seconds
Converted image in 1.2728 seconds
Converted image in 2.0469 seconds
So still slower than hdf5, but fast enough for now! I'll close this.
from pybdv.
I looked into this a bit more, and the slowdown seems to come from downsampling in z. If I change the downscale_factors to [[1,2,2], [1,2,2], [1,2,2]] then all images are converted in ~1 second.
I profiled it, and it seems like most time is spent in _check_shape_and_position_scaling() reading data from the n5 file here: https://github.com/constantinpape/pybdv/blob/master/pybdv/bdv_datasets.py#L62 So it seems reading from n5 is slower than reading from hdf5
from pybdv.
Related Issues (20)
- anisotropic voxel sizes HOT 4
- dealing with absolute paths HOT 4
- attributes no longer supported HOT 4
- Downsampling if already present HOT 2
- #viewsetups >100 HOT 10
- memmaps while modifying metadata only HOT 2
- edit mode and group mode kill each other HOT 3
- pybdv crashes when I import HOT 1
- Scales by make_bdv seem to 'move' the data HOT 5
- Halo computation in downsample function does not work correctly HOT 3
- make_bdv fails upon certain dataset size HOT 2
- TIF conversion fails due to missing extension in directory path HOT 13
- generate N5 fails HOT 2
- chunk boundaries visible as black cubes HOT 7
- on the fly example 3D, multi channels, multi timepoints HOT 1
- Updating version on conda HOT 3
- Feature request: working with dask arrays HOT 5
- file not found error in abspath HOT 2
- Interpolation mode failed in the newest version?
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 pybdv.