gschramm / pyapetnet

a CNN for anatomy-guided deconvolution and denoising of PET images
https://gschramm.github.io/pyapetnet/
MIT License
16 stars 5 forks source link

pyapetnet issue #3

Closed AFPET closed 3 years ago

AFPET commented 3 years ago

Hello: pyapetnet installation seems to be complete, but I do not get as the installation instructions says "number of command line scripts all starting with pyapetnet* "
Instead, I get the following with no further actions.

{ (pyapetnet) PS C:\Users\User> python Python 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.

import pyapetnet print(pyapetnet.version) 1.1.1 print(pyapetnet.file) C:\Users\User\miniconda3\envs\pyapetnet\lib\site-packages\pyapetnet__init__.py

}

any idea what is the issue? thanks

gschramm commented 3 years ago

Hi Adam,

  1. The test within python seem fine. They show that you have installed the python package pyapetnet v.1.1.1 in your pyapetnet miniconda environment.
  2. The installation of pyapetnet comes with 3 command line tools that you can use to make predictions with pre-trained models in pyapetnet.
    1. pyapetnet_list_models
    2. pyapetnet_predict_from_nifti
    3. pyapetnet_predict_from_dicom

You can run all of them directly from the command line without starting python (but you must have activate your conda environment). If you run them with -h you can see the help page of all scripts.

If you want to understand what is going on under the hood when doing predictions, you can run this notebook.

If you want to train your own models, you can have a look at this script.

AFPET commented 3 years ago

Thank you for the reply, I still cannot get the package working. I use the conda powershell (py3k) to run the pretrained models you listed above and I get the error: { pyapetnet_predict_from_nifti : The term 'pyapetnet_predict_from_nifti' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.} Not sure what I am doing wrong.

gschramm commented 3 years ago

sorry to hear that. Did you activate the virtual conda env where you install pyapetnet?

To test this you could e.g. execute:

python -c "import pyapetnet; print(pyapetnet.__file__)"

If this gives an error pyapetnet is not correctly installed.

AFPET commented 3 years ago

all good thx.

gschramm commented 3 years ago

Good to hear that. What was the issue?