Code Monkey home page Code Monkey logo

Comments (8)

laramiel avatar laramiel commented on July 23, 2024

Can you identify whether it is present in 0.1.52 and/or 0.1.53?

from tensorstore.

YuelongWu avatar YuelongWu commented on July 23, 2024

Both have the issue. 0.1.51 is the last version that works on my machine.

from tensorstore.

laramiel avatar laramiel commented on July 23, 2024

Thanks. I suspect that there's a boundary condition in c6807c4 which triggers this.

from tensorstore.

laramiel avatar laramiel commented on July 23, 2024

What is your downsampling for this?

from tensorstore.

YuelongWu avatar YuelongWu commented on July 23, 2024

Do you mean the downsample_factors? It was [4, 4, 1, 1], and 'mean' was the downsample_method.

from tensorstore.

jbms avatar jbms commented on July 23, 2024

We are having trouble reproducing this --- can you provide the exact steps to reproduce the issue?

from tensorstore.

YuelongWu avatar YuelongWu commented on July 23, 2024

here is a minimal reproducible example:

import tensorstore as ts
import cv2

src_spec = {
    'driver':'neuroglancer_precomputed',
    'kvstore':'gs://yuelong-test-data/tensorstore_test/W05_S001R2'
    }
ds_spec = {
    "driver": "downsample",
    "downsample_factors": [4,4,1,1],
    "downsample_method": 'mean',
    "base": src_spec
    }
ds_ts = ts.open(ds_spec).result()
img = ds_ts[4096:4608,4096:4608,0,0].read().result()
cv2.imwrite('test.png', img)

test.png:
test

The source bucket was created by Michal under lcht-goog-connectomics project, so you should have access to it. Tested on Rocky Linux 8.9 with Python 3.12.2 & Tensorstore 0.1.54.

from tensorstore.

laramiel avatar laramiel commented on July 23, 2024

I can verify a repro using examples/extract_slice and a downsampling of [2,2,1,1] or [4,4,1,1], with an output shape of [64, 64, 1, 1]:


SPEC='--input_spec={
  "base": {
    "driver": "neuroglancer_precomputed",
    "kvstore": {
      "bucket": "yuelong-test-data",
      "driver": "gcs",
      "path": "tensorstore_test/W05_S001R2/"
    },
    "transform": {
      "input_exclusive_max": [46696, 50835, 1, 1],
      "input_inclusive_min": [0, 0, 0, 0],
      "input_labels": ["x", "y", "z", "channel"]
    }
  },
  "downsample_factors": [2, 2, 1, 1],
  "downsample_method": "mean",
  "driver": "downsample",
  "dtype": "uint8",
  "transform": {
    "input_exclusive_max": [4672, 4672, 1, 1],
    "input_inclusive_min": [4608, 4608, 0, 0],
    "input_labels": ["y", "x", "z", "channel"]
  }
}'


/tmp/extract_slice.before  --output_file=/tmp/before.png  "${SPEC}"
/tmp/extract_slice.after  --output_file=/tmp/after.png  "${SPEC}"

compare -compose src /tmp/before.png /tmp/after.png /tmp/compare.png

from tensorstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.