-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hi, thanks for develping this tool for us. I have to report a issue during bin2cell.stardist for my 10X HD Visium sample segment. The bin2cell.stardist produced "Found 0 objects" whether I load square_008um or square_002um data
import numpy as np
import matplotlib.pyplot as plt
import scanpy as sc
import tensorflow
import os
import collections
import bin2cell as b2c
import pandas as pd
import gc
#set the path
path = "/home/data/Data_Storage/COAD/n2023262/binned_outputs/square_008um/"
#the image you used for --image of spaceranger, that's the one the spatial coordinates are based on
source_image_path = "/home/data/Data_Storage/Source_image_b2cell/n2023262.jpg"
spaceranger_image_path = "/home/data/Data_Storage/COAD/n2023262/binned_outputs/square_008um/spatial"
#read data
n2023262= b2c.read_visium(path,
source_image_path = source_image_path,
spaceranger_image_path = spaceranger_image_path
)
n2023262.var_names_make_unique()
#filtration
sc.pp.filter_genes(n2023262, min_cells=3)
sc.pp.filter_cells(n2023262, min_counts=1)
n2023262
#scale
mpp = 0.5
b2c.scaled_he_image(n2023262, mpp=mpp, save_path="/home/data/liangxs/R_project/a_Ongoing_SpatialHD/Jupyter/stardist/n2023262_he.tiff")
b2c.destripe(n2023262)
###All the above steps went well
###However, the b2c.stardist produced "Found 0 objects":
b2c.stardist(image_path="/home/data/liangxs/R_project/a_Ongoing_SpatialHD/Jupyter/stardist/n2023262_he.tiff",
labels_npz_path="/home/data/liangxs/R_project/a_Ongoing_SpatialHD/Jupyter/stardist/n2023262_he.npz",
stardist_model="2D_versatile_he",
prob_thresh=0.01
)
_function_base_impl.py (107): overflow encountered in cast
_function_base_impl.py (4750): overflow encountered in cast
_function_base_impl.py (4655): invalid value encountered in multiply
_function_base_impl.py (4656): invalid value encountered in scalar multiply
Found model '2D_versatile_he' for 'StarDist2D'.
Loading network weights from 'weights_best.h5'.
Loading thresholds from 'thresholds.json'.
Using default values: prob_thresh=0.692478, nms_thresh=0.3.
Overriding with prob_thresh=0.01
effective: block_size=(4096, 4096, 3), min_overlap=(128, 128, 0), context=(128, 128, 0)
100%|██████████| 16/16 [01:46<00:00, 6.65s/it]
Found 0 objects
bin2cell version: '0.3.4'
How to solve this problem, please~