hilab-git / pymic Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
王老师,您好,在ClassificationDataset定义中,读取数据权重时是不是存在错误
if self.image_weight_idx is not None:
sample["image_weight"] = self.getweight(idx)
但是您并没有定义self.getweight。而是重写了self.get_pixel_weight
是不是应该将self.getweight(idx)修改为self.get_pixel_weight(idx
When I run the Pymic_examples , I found a problem in the function logging.basicConfig in the file train.py. This function call the function datetime.now() and use it in the filename.However ,the datetime.now() function include the char ":” which is not valid in filename on windows .
I am not sure if it is the problem.
https://github.com/HiLab-git/PyMIC/blob/master/pymic/net_run/train.py
line 85
There is no config file found here, which is different from the example. How can I use this project to train my own dataset and where should the dataset be placed
Dear @taigw ,
Thanks for your sharing awesome projects about medical image.
Here seems should be from pymic.layer
rather than from pyMIC.layer
in pymic/net3d/unet3dsep.py
file, line7&8, as follows
from pyMIC.layer.activation import get_acti_func
from pyMIC.layer.deconvolution import DeconvolutionLayer
make alpha dynamic
print(pymic.version) does not work
Dear author:
When I have configured the environment as required and put relevant documents in place,I run image_convert.py,but when it goes to JPCLN120.IMG or JPCLN121.IMG,it will goes wrong:
Traceback (most recent call last):
File "***/PyMIC-master/examples/JSRT/image_convert.py", line 63, in <module>
convert_JCRT_images(input_image_dir, output_image_dir)
File "***/PyMIC-master/examples/JSRT/image_convert.py", line 21, in convert_JCRT_images
data = data.reshape(shape)
ValueError: cannot reshape array of size 4130214 into shape (2048,2048)
I have no idea about this. Could you please give me a solution or suggestion?
Best wishes!
both old version and new versions have issues on colab
error in new version of pymic:
/content/drive/MyDrive/MyoPS2020/project/PyMIC/pymic/util
Traceback (most recent call last):
File "/content/drive/MyDrive/MyoPS2020/project/PyMIC/pymic/util/evaluation_seg.py", line 16, in
from pymic.util.general import is_image_name
ImportError: cannot import name 'is_image_name' from 'pymic.util.general' (/usr/local/lib/python3.10/dist-packages/pymic/util/general.py)
error in old version of pymic:(had same issue on local as well)
File "/usr/local/lib/python3.10/dist-packages/pymic/util/evaluation_seg.py", line 279, in main
evaluation(config_file)
File "/usr/local/lib/python3.10/dist-packages/pymic/util/evaluation_seg.py", line 225, in evaluation
gt_full_name = gt_root + '/' + gt_name
TypeError: can only concatenate str (not "float") to str
Dear @taigw ,
Thanks for sharing the excellent work.
It seems here should be unet3d
rather than unet2d5_ag
.
Sorry to bother.
I use pip install PYMIC for the latest 0.4.0 version.
And use it to run projects using pymic but have this issue.
together with something else, seems like I can't use
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "f:\ISY5001\task\MIS-FM-main\predict.py", line 10, in
from pymic.net_run.agent_seg import SegmentationAgent
File "E:\software\anaconda3\Lib\site-packages\pymic\net_run\agent_seg.py", line 20, in
from pymic.net.net_dict_seg import SegNetDict
import pymic.net.net2d.trans2d.transunet_cfg as configs
File "E:\software\anaconda3\Lib\site-packages\pymic\net\net2d\trans2d\transunet_cfg.py", line 4, in
import ml_collections
ModuleNotFoundError: No module named 'ml_collections'
How can I solve that?
nice work!
I obtained good results using a private dataset for a four-class classification [0,100,200,255]. However, I encountered a puzzling issue. When I used the command "pymic_nll test config/unet_trinet.cfg" to run the test set, the generated pred_mask values are not only [0,100,200,255], but essentially include all values from 0 to 255.
I am certain that I used four-class classification during my training and I can see the Dice coefficient for each class.
In the following lines, the config key num_workder
looks like a typo of num_worker
. This leads to a key error when reading the config files.
Please consider fixing it. Thanks!
PyMIC/pymic/net_run/agent_abstract.py
Line 262 in a114a79
PyMIC/pymic/net_run_nll/nll_dast.py
Line 159 in a114a79
PyMIC/pymic/net_run_ssl/ssl_abstract.py
Line 76 in a114a79
nice work!
PyMIC seems to have dependencies on ml_collections
, einops
,monai
, but these packages aren't declared in setup.py. Someone who use PyMIC
may still need to run pip install ml_collections einops monai
even after pip install pymic
.
(pymic) ➜ ~ pip list |grep -i "pymic"
PYMIC 0.4.0
(pymic) ➜ ~ pymic_train /home/yeep/project/py/sph/sph2d/unet.cfg
Traceback (most recent call last):
File "/home/yeep/env/miniconda/envs/pymic/bin/pymic_train", line 5, in <module>
from pymic.net_run.train import main
File "/home/yeep/env/miniconda/envs/pymic/lib/python3.9/site-packages/pymic/net_run/train.py", line 10, in <module>
from pymic.net_run.agent_seg import SegmentationAgent
File "/home/yeep/env/miniconda/envs/pymic/lib/python3.9/site-packages/pymic/net_run/agent_seg.py", line 20, in <module>
from pymic.net.net_dict_seg import SegNetDict
File "/home/yeep/env/miniconda/envs/pymic/lib/python3.9/site-packages/pymic/net/net_dict_seg.py", line 24, in <module>
from pymic.net.net2d.trans2d.transunet import TransUNet
File "/home/yeep/env/miniconda/envs/pymic/lib/python3.9/site-packages/pymic/net/net2d/trans2d/transunet.py", line 15, in <module>
import pymic.net.net2d.trans2d.transunet_cfg as configs
File "/home/yeep/env/miniconda/envs/pymic/lib/python3.9/site-packages/pymic/net/net2d/trans2d/transunet_cfg.py", line 4, in <module>
import ml_collections
ModuleNotFoundError: No module named 'ml_collections'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.