8000 GitHub - brainfo/happy: debug and update happy
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

brainfo/happy

 
 

Repository files navigation

Histology Analysis Pipeline.py (HAPPY)

Fork

a fork for packaging and easy inference usage (on torch 2.6.0+cu12).

This fork won't touch any training pipeline.

Fork To do

  • chunck all sql insert command to get around too many records issue (too many nuclei or cell prediction to be saved, especially)
  • convert the graph_model.pt to be state_dict only. for the loading using newer versions of torch. (I am on torch 2.6.0+cu124)

Installation

sudo apt install libvips

Recommend using uv to install.

uv pip install git+https://github.com/brainfo/happy.git

Inferences

  1. cell inference
python $happy_prefix/cell_inference.py --project-name placenta --organ-name placenta --nuc-model-id 1 --cell-model-id 2 --slide-id 1 --cell-batch-size 800 --nuc-batch-size 16 > cell_inference.stdout 2>&1
  1. Use the converted state dict model for graph inference, for the run id correctly with cell predictions saved in the database
python $happy_prefix/graph_inference.py --project-name placenta --organ-name placenta --pre-trained-path $happy_prefix/projects/placenta/trained_models/graph_converted_state_dict.pth --run-id 3 > graph_inference.stdout 2>&1

On the original version

With this env:

requires-python = "==3.10.16"
dependencies = [
    "torch==2.0.1",
    "torch-geometric==2.3.1",
    "torch-scatter",
    "torch-sparse",
    "torch-cluster",
    "torch-spline-conv"
]
[tool.uv]
package = false
git clone https://github.com/Nellaker-group/happy.git
cd happy
uv pip install -e .

will work

About

debug and update happy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.7%
  • Groovy 2.0%
  • Makefile 0.3%
0