scverse / scverse/spatialdata

Faster implementation available for `vectorize()`

Open
#634 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ✨
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

During the Ghent Hackathon (BioHackrXiv here) a faster implementation for vectorize() has been developed by @hey2homie: https://github.com/saeyslab/VIB_Hackathon_June_2024/blob/main/polygons/polygons_test.ipynb.

The implementation also fixes https://github.com/scverse/spatialdata/issues/583, but relies on opencv, which is a heavy dependency.

Still, we should see if that code could help improving the performance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the polygons_test.ipynb implementation linked in the issue, then locate the current vectorize() implementation in spatialdata. Compare its performance and behavior with the notebook approach, including the fix for issue #583 and the cost of adding opencv. Done means the performance tradeoff and dependency impact are evaluated and any improvement is verified against the reported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, opencv, python
Domain
data, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.