Giter Site home page Giter Site logo

amst's People

Stargazers

Lukas Grünewald avatar Chris Barnes avatar  avatar Andy Boyd avatar Robert Haase avatar Genevieve Buckley avatar Prisca R avatar Yi Sun avatar

Watchers

Jose Miguel Serra avatar  avatar Andy Boyd avatar

Forkers

zikai1 martlj

amst's Issues

Saving transformations

Hello,

Thanks for making this code available! I'm working on aligning a set of slices, and have two stacks each taken with a different detector. One has much sharper features, so I'm running AMST on that stack and having good success. Is there a way for me to save the transformations/translations that AMST performs so I can apply them to the stack taken with the other detector?

Thanks!

autoreload error python notebook

Windows 10 pro. python 3.6. anaconda 2.1.1

Ran the steps (github readme) from the powershell prompt on anaconda. Was missing meson so I pip3'd it separately.

Opened the notebook in VS Code with the python extension and got the following error. I am working in a kernel with the amst env active.

NameError Traceback (most recent call last)
in
----> 1 get_ipython().run_line_magic('load_ext', 'autoreload')
2 get_ipython().run_line_magic('autoreload', '2')
3 from amst.amst_main import amst_align, default_amst_params
4
5 raw_folder = 'C:\Users\Fung2\Desktop\AMST_kidney_test\raw' #

c:\Users\fung2\anaconda3\envs\amst_env\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2324 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2325 with self.builtin_trap:
-> 2326 result = fn(*args, **kwargs)
2327 return result
2328

c:\Users\fung2\anaconda3\envs\amst_env\lib\site-packages\decorator.py in fun(*args, **kw)
229 """
230 evaldict = dict(call=caller, func=func)
--> 231 es = ''
232 for i, extra in enumerate(extras):
233 ex = 'e%d' % i

NameError: name 'fix' is not defined

Error while running AMST

Hi @jhennies,

I get this error when I try to execute AMST:

Traceback (most recent call last):
  File "C:\Users\au711234\~\amst\amst_win\example_usage.py", line 1, in <module>
    from amst.amst_main import amst_align, default_amst_params
  File "C:\Users\au711234\Anaconda3\envs\amst_env\lib\site-packages\amst\amst_main.py", line 9, in <module>
    from vigra import gaussianSmoothing
  File "C:\Users\au711234\Anaconda3\envs\amst_env\lib\site-packages\vigra\__init__.py", line 113, in <module>
    from . import vigranumpycore
ImportError: cannot import name 'vigranumpycore' from partially initialized module 'vigra' (most likely due to a circular import) (C:\Users\au711234\Anaconda3\envs\amst_env\lib\site-packages\vigra\__init__.py)

Can you please guide me on how to solve this issue?

Thanks!
Rajlakshmi

Pre-aligned step

The example require to already have pre-aligned images. From the publication , I thought that this step was done by AMST, however I don't see an example here how to perform it, should it be done without AMST ?
Otherwise could you provide a simple example on how to perform it?

Add license

Dear @jhennies ,

first of all thanks for putting out this resource! I'm working on a collaborative project where we were thinking of reusing the code you published here in a larger scenario. In order to re-use the code, it would be great if you could put a license file in the repository so that we know under which constraints we are allowed to reuse the code.

If you're not sure which license is the right one (permissive versus restrictive licensing), I'm happy to assist. Also check out

https://choosealicense.com/

Thanks!

Best,
Robert

Installation issue on Windows

Hi @jhennies ,

I'm having some installation issues on my Windows machine.
This is the machine specification: Dell Workstation - Windows 10 Enterprise 64 bits
I have installed Anaconda3-2024.2-1 (64 bits).

I failed to install with the codes on the README, including the separate steps using pip. The fail installation starts in the fabio-2022.12.0.tar.gz (as in the text file that I copied from the prompt).
amst_instalation_error.txt

I was just wondering how you made that wheel?
Can you point me to the source code repository and build pipeline for it?
I might then be able to install it myself.

Many thanks.

Installation issue

Hi @jhennies ,

I'm having some installation issues on my Windows machine. This command

pip install amst_bin_win-0.1.2-cp36-cp36m-win_amd64

Produces this error message:

ERROR: Could not find a version that satisfies the requirement amst_bin_win-0.1.2-cp36-cp36m-win_amd64 (from versions: none)
ERROR: No matching distribution found for amst_bin_win-0.1.2-cp36-cp36m-win_amd64

I'm running on Windows 10 64-bit with Python 3.6.15 installed in a conda environment.

When upacking the wheel I noticed that inside are not soo many files. But I failed installing them separately using pip because there is no setup.py inside. I was just wondering how you made that wheel? Can you point me to the source code repository and build pipeline for it? I might then be able to install it myself.

Thanks!

Best,
Robert

Issue with installation

Hi @jhennies ,
I am having some issues with installation.

This command: pip install amst_bin_win

gives this error:

ERROR: Command errored out with exit status 1:
   command: 'C:\Users\au711234\Anaconda3\envs\amst_env\python.exe' 'C:\Users\au711234\Anaconda3\envs\amst_env\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\au711234\AppData\Local\Temp\pip-build-env-2h52naqu\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'meson-python>=0.11' 'meson>=0.64; platform_system=='"'"'Windows'"'"'' 'meson; platform_system!='"'"'Windows'"'"'' ninja wheel numpy 'Cython>=0.25' numpy 'pyproject-metadata>=0.5.0' 'tomli>=1.0.0'
       cwd: None
  Complete output (3 lines):
  Ignoring meson: markers 'platform_system != "Windows"' don't match your environment
  ERROR: Could not find a version that satisfies the requirement meson-python>=0.11 (from versions: none)
  ERROR: No matching distribution found for meson-python>=0.11
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\au711234\Anaconda3\envs\amst_env\python.exe' 'C:\Users\au711234\Anaconda3\envs\amst_env\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\au711234\AppData\Local\Temp\pip-build-env-2h52naqu\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'meson-python>=0.11' 'meson>=0.64; platform_system=='"'"'Windows'"'"'' 'meson; platform_system!='"'"'Windows'"'"'' ninja wheel numpy 'Cython>=0.25' numpy 'pyproject-metadata>=0.5.0' 'tomli>=1.0.0' Check the logs for full command output.

Can you please guide me to solve this?

Thanks!
Rajlakshmi

KeyError pyopencl.Context

Good morning,
I am having an error when trying to run amst python script. I am using Ubuntu 20.04.3 LTS. This is the pip list of my amst environment:

Package Version


appdirs 1.4.4
backcall 0.2.0
cached-property 1.5.2
certifi 2021.5.30
cloudpickle 2.0.0
cycler 0.11.0
cytoolz 0.11.0
dask 2021.3.0
dataclasses 0.8
decorator 5.1.1
entrypoints 0.4
fabio 0.14.0
h5py 3.1.0
hdf5plugin 3.3.1
imagecodecs-lite 2019.12.3
imageio 2.9.0
ipykernel 5.5.6
ipython 7.16.3
ipython-genutils 0.2.0
jedi 0.17.2
jupyter-client 7.1.2
jupyter-core 4.9.2
kiwisolver 1.3.1
Mako 1.2.0
MarkupSafe 2.0.1
matplotlib 3.3.4
mkl-fft 1.3.0
mkl-random 1.1.1
mkl-service 2.3.0
nest-asyncio 1.5.5
networkx 2.5
numpy 1.19.5
olefile 0.46
packaging 21.3
parso 0.7.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.4.0
pip 21.2.2
platformdirs 2.5.1
prompt-toolkit 3.0.31
ptyprocess 0.7.0
pyelastix 1.2
Pygments 2.13.0
pyopencl 2022.1.6
PyOpenGL 3.1.6
pyparsing 3.0.9
PyQt5 5.15.6
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.1
python-dateutil 2.8.2
pytools 2022.1.12
PyWavelets 1.1.1
PyYAML 5.4.1
pyzmq 23.2.1
qtconsole 5.2.2
QtPy 2.0.1
scikit-image 0.17.2
scipy 1.5.4
setuptools 58.0.4
silx 1.0.0
six 1.16.0
tifffile 2019.7.26.2
toolz 0.11.2
tornado 6.1
traitlets 4.3.3
typing_extensions 4.1.1
wcwidth 0.2.5
wheel 0.37.1

This is the script I am running, all inputs exist:

Copy this script to a desired location

E.g., if AMST was cloned to /home/user/src/amst make a home/user/src/amst_experiments folder for the execution scripts

import sys

Append the location of the amst package to the system path. Replace by the proper location, e.g. '/home/user/src/amst'

for the example above

sys.path.append('/home/tomo/Software/amst/')

from amst_linux.amst_main import amst_align, default_amst_params

raw_folder = '/home/tomo/RUSKA_MOUNTPOINT//20220729/AMST/raw/'
pre_alignment_folder = '/home/tomo/RUSKA_MOUNTPOINT/
//20220729/AMST/prealigned/'
target_folder = '/home/tomo/RUSKA_MOUNTPOINT/*/20220729/AMST/results/'

Load the default parameters

params = default_amst_params()
params['n_workers'] = 8 # The default number of CPU cores is 8; set this to the number that is available
#params['sift_devicetype'] = 'CPU' #CPU/GPU

Due to the multiprocessing, in Windows, the following has to be inside a name == 'main' block

In Linux it doesn't matter, but it also does no harm

if name == 'main':
amst_align(
raw_folder=raw_folder,
pre_alignment_folder=pre_alignment_folder,
target_folder=target_folder,
**params
)

I tried modifing the sift device type between CPU and GPU (line: params['sift_devicetype'] = 'CPU' ) and also commenting the line with same result.

And this is the error:

Traceback (most recent call last):
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/tools.py", line 100, in wrapper
return ctx_dict[cl_object][cache_key]
KeyError: <pyopencl.Context at 0x561a25ccf490 on <pyopencl.Device 'NVIDIA GeForce GTX 1080' on 'NVIDIA CUDA' at 0x561a257f6250>>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "amst_script.py", line 10, in
from amst_linux.amst_main import amst_align, default_amst_params
File "/home/tomo/Software/amst/amst_linux/amst_main.py", line 20, in
print('Running SIFT on ' + sift.SiftPlan(shape=(10, 10)).ctx.devices[0].name)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/silx/opencl/sift/plan.py", line 173, in init
self._allocate_buffers()
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/silx/opencl/sift/plan.py", line 268, in _allocate_buffers
self.cl_mem["255"].fill(255.0)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/array.py", line 1455, in fill
self._fill(self, value, queue=queue, wait_for=wait_for))
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/array.py", line 200, in kernel_runner
knl = kernel_getter(*args, **kwargs)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/array.py", line 954, in _fill
return elementwise.get_fill_kernel(result.context, result.dtype)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/tools.py", line 103, in wrapper
result = func(cl_object, *args, **kwargs)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/elementwise.py", line 714, in get_fill_kernel
name="fill")
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/elementwise.py", line 174, in get_elwise_kernel
name=name, options=options, **kwargs)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/elementwise.py", line 161, in get_elwise_kernel_and_types
kernel = getattr(prg, name)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/init.py", line 461, in getattr
knl = Kernel(self, attr)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/init.py", line 816, in kernel_init
self._setup(prg)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/init.py", line 821, in kernel__setup
from pyopencl.invoker import generate_enqueue_and_set_args
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pyopencl/invoker.py", line 310, in
key_builder=_NumpyTypesKeyBuilder())
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pytools/persistent_dict.py", line 621, in init
_PersistentDictBase.init(self, identifier, key_builder, container_dir)
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/pytools/persistent_dict.py", line 500, in init
import platformdirs as appdirs
File "/home/tomo/Software/miniconda/envs/amst_env/lib/python3.6/site-packages/platformdirs/init.py", line 5
from future import annotations
^
SyntaxError: future feature annotations is not defined

I tried also with the known issues related to GPU but with same result.
I also did (you can see in the pip list):
conda install -c conda-forge ocl-icd-system
conda install -c conda-forge pocl

Hope you can help and thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.