How can I keep the pyqt GUI responsive when performing a cpu intensive task?

I'm writing a data acquisition program and I'm interested in keeping the GUI responsive at all times. That's why I'm using QThreads for the job. Even though the result is slightly better when...

Load a tiff stack in a numpy array with python

I am having a little issue with .tif files. I am sure it is only a minor problem that I can´t get around (keep in mind, I am a relatively new programmer). Basically: I have prepared .tif files...

tifffile cannot decompress JPEG because JPEG not in TIFF.DECOMPRESSORS

import tifffile f = 'some.tif' img = tifffile.imread(f) Gives error: ~/.conda/envs/cmap_py3/lib/python3.6/site-packages/tifffile/tifffile.py in imread(files, **kwargs) 443 if...

Read tiff tags in Python

I am trying to read the tags of a tiff file in Python. The file is RGB with uint16 values per channel. I am currently using tifffile: import tifffile img = tifffile.imread('file.tif') However,...

Merging images into z-stack and making max-projection / in Python

It would be great if someone could me help me to write code in Python (which I am gradually learning) to solve the problem I am facing. We are using high-throughput microscope, and I am imaging 96...

TypeError: unexpected keyword argument: img_num

I have several 2D images, and want to convert these slices to a 3D image with python. i found the next code, and I don't not know what exactly I have done worng... from skimage import...

How to save a very large numpy array as an image, loading as little as possible into memory

My program is often working with numpy arrays that are very large ((819200, 460800, 4), uint8). To store this in memory (as just pure zeros) I would need over 1.3TB of memory which is absurd. My...

Two sets of Qt binaries used by both opencv and pyqt

I'm running a script running both PyQT5 and cv2 and got the message You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt...

Python and ffmpeg create different tiff stacks

Hello everybody out there with an interest in image processing, Creating a multipage tiff file (tiff stack) out of a grayscale movie can be achieved without programming using ffmpeg and tiffcp...

How do I write code to use the tifffile library to read TIFF files and convert them to JPEGs?

I am trying to write a Python program that will open a TIFF file that has transparencies on it and create a JPEG while also keeping the TIFF file. I've tried Pillow but it won't process TIFFs...

`Building wheel for opencv-python (PEP 517) ... -` runs forever

When I run !pip install imgaug==0.4.0 the following is the output Collecting imgaug==0.4.0 Using cached...

CalledProcessError: Command '['convert', '--version']' returned non-zero exit status 1

Got the DLC-GPU.yaml from here: https://github.com/DeepLabCut/DeepLabCut/blob/master/conda-environments/DLC-GPU.yaml (base) [email protected]:~/research$ conda env create --name dlc...

Ipywidgets with Voila not showing: ERROR tornado Uncaught exception GET

I am trying to use voila by running the examples they provide, but the widgets don't show (outputs from jupyter and voila) and I get these errors: (voila_env) Z:\Programming\voila\notebooks>voila...

Particle tracking with trackpy gives 'keframe' error?

I have tiff image stacks of 1000 frames in which I'm trying to track particles diffusing in Brownian motion. So I'm using trackpy for particle tracking: import the tiff stack, locate the features...

fatal error: cuda_runtime_api.h: No such file or directory when trying to use cuda in docker

I am trying to build a docker image for a python script that I would like to deploy. This is the first time I am using docker so I'm probably doing something wrong but I have no clue what. My...

not able to install easyocr (pytorch error)

I am trying to install easyocr for python using pip pip install easyocr but it's not installing its givig me this in the terminal ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but...

I cannot use opencv2 and received ImportError: libgl.so.1 cannot open shared object file no such file or directory

env:ubuntu16.04 anaconda3 python3.7.8 cuda10.0 gcc5.5 command: conda activate myenv python import cv2 error: Traceback (most recent call last): File "", line 1, in File...

Python Tifffile: Problems with loading images in SageMaker

I am using Tifffile to load .tiff-image files and then to convert them to a PIL image to process them. I use this workaround because other methods had problems with some specific TIFF-images. On...

Python program crashes when saving text-file

I have a large image stack with 853 images, each image has the dimensions (11779, 15394) pixels and 3 channels. The images have 8bit depth and are saved in BigTiff format. My data is stored on an...

Trouble installing turbodbc

I am attempting to install turbodbc on my Ubuntu 20.10 machine. My specs are as follows: pip 20.2.4, Python 3.8.5 , gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0 I have attempted the solutions provided in...

Saving a multidimensional array as tiff image in python

I am working on a Hyperspectral Image(HSI) of Indian Pines. Initially the data was stored in .mat file and then using loadmat function I have read the data in an array. The array dimension is...

ImportError: cannot import name 'download_url_to_file'

I tried to run a Python script that uses the download_url_to_file method inside the torch hub, but I got the following error: Traceback (most recent call last): File "crop-video.py", line 1, in...

Updating packages in conda

I have a problem with updating packages in conda. The list of my installed packages is: # # Name Version Build Channel _anaconda_depends 2020.07 ...

Loading non RGBA 4-tile multi page tiff images with skimage into dask array

I need to read a folder full of multi-page tiffs generated by the Suite2p neurobiology package. From the Suite2p source code the multi-tiffs are created as follows: import numpy as np from...

This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93

ChromeDriver is giving an error about its version being too low: This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93. I've updated pip's packages...

Sudden Tensorflow / Keras Google Colab dependency problems `AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'`

I have running a machine learning model (Matterport's Mask R-CNN) in google colab for a couple of weeks. All of a sudden today I am unable to run any of my notebooks due to I think some kind of...

Python3 Import Error: undefined symbol: aes_hw_encrypt

I am trying to use DialogFlow to make a small talk chatbot on Raspberry Pi 4, and I am getting this error: ImportError:...

Poetry hangs when installing torch

I'm trying to add pytorch_pretrained_bert package, but it hangs on downloading torch. I've been waiting for almost 30 mins already. I'm running this command: poetry add pytorch_pretrained_bert...

No module named 'netCDF4'

I am currently working with netCDF data in the Spyder IDE, however when I try to import 'Dataset' from the module from netCDF4 import Dataset it is giving me the following error: "No module...

pycharm error happening at random time: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I am working with pycharm community on a tensorflow model with keras backend, sometimes this error appears in a random time, specially after I call pyplot and close the window: Exception ignored...