TopoXLab / MCSpatNet

Repository for ICCV2021 MCSpatNet: Multi-Class Cell Detection Using Spatial Context Representation
MIT License
20 stars 8 forks source link

Issues with generating the cross k function maps #2

Open juncaoker0r0 opened 2 years ago

juncaoker0r0 commented 2 years ago

Dear Author,

I seem to have encountered a problem while running the python file 2_calc_kmaps.py. It does not read the elements from the list. I have searched to convert it with rpy2 localconverter but still seem to fail. How shall I proceed. Thank you in advance

Traceback (most recent call last): File "/MCSpatNet/data_prepare/2_calc_kmaps.py", line 85, in cells_ppp = ppp(cells_x, cells_y, cells_mark) # the point pattern in R object File "../spatial_analysis_utils_v2_sh.py", line 56, in ppp window_xrange=rfc([robj.r.min(rfc(x)), robj.r.max(rfc(x))]) File "python3.6/site-packages/rpy2/robjects/vectors.py", line 492, in init obj = FloatSexpVector(obj) ValueError: Error while trying to convert element 0 to a double.

kaiXuewen commented 2 years ago

I have the same problem as you, have you solved it?

wxyz-wjx commented 7 months ago

Dear Author: when I use the python file 2_calc_kmaps.py ,it appends the following question ,how can i slove it?

UserWarning: R object inheriting from "POSIXct" but without attribute "tzone". warnings.warn('R object inheriting from "POSIXct" but without ' img /home/wz/MCSpatNet-main/datasets/CoNSeP_train/images/train_12.png Traceback (most recent call last): File "2_calc_kmaps.py", line 85, in cells_ppp = ppp(cells_x, cells_y, cells_mark) # the point pattern in R object File "../spatial_analysis_utils_v2_sh.py", line 60, in ppp pp['ppp'] = spatstat.ppp(x=rfc(x), y=rfc(y), AttributeError: module 'spatstat' has no attribute 'ppp'

wxyz-wjx commented 7 months ago

I have the same problem as you, have you solved it?

hi ,have you solver this question?

wxyz-wjx commented 7 months ago

Dear Author,

I seem to have encountered a problem while running the python file 2_calc_kmaps.py. It does not read the elements from the list. I have searched to convert it with rpy2 localconverter but still seem to fail. How shall I proceed. Thank you in advance

Traceback (most recent call last): File "/MCSpatNet/data_prepare/2_calc_kmaps.py", line 85, in cells_ppp = ppp(cells_x, cells_y, cells_mark) # the point pattern in R object File "../spatial_analysis_utils_v2_sh.py", line 56, in ppp window_xrange=rfc([robj.r.min(rfc(x)), robj.r.max(rfc(x))]) File "python3.6/site-packages/rpy2/robjects/vectors.py", line 492, in init obj = FloatSexpVector(obj) ValueError: Error while trying to convert element 0 to a double.

Did you slove this question?