-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error loading new video #241
Comments
Maybe the video is too heavy? What is the maximum input video size that minian can support? |
You did not correctly define the file name pattern. Try
param_load_videos = {
"pattern": "video conversion .tiff",
"dtype": np.uint8,
"downsample": dict(frame=1, height=1, width=1),
"downsample_strategy": "subset",
}
…On Wed, May 3, 2023, 9:31 AM leodiej ***@***.***> wrote:
Maybe the video is too heavy? What is the mawimum input video size that
minian can support?
—
Reply to this email directly, view it on GitHub
<#241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4YH53UDUAX4KVE3MAUX3TXEJM3XANCNFSM6AAAAAAXUIDQ2E>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I changed it and I got an error too. If I limit the number of slices and put in line 5 : |
Please always paste the full error in your message. It is difficult to
diagnose without the error message.
…On Wed, May 3, 2023, 9:48 AM leodiej ***@***.***> wrote:
I changed it and I got an error too. If I limit the number of slices and
put in line 5 :
subset = dict(frame=slice(0, 499)) for example, would it work? I am
thinking maybe the video is too heavy. It's a 35GB video.
—
Reply to this email directly, view it on GitHub
<#241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4YH555CIESLLV5BRVGW5DXEJO3RANCNFSM6AAAAAAXUIDQ2E>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ValueError Traceback (most recent call last) File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:116, in load_videos(vpath, pattern, dtype, downsample, downsample_strategy, post_process) ValueError: Extension not supported. |
Try renaming your file extension to .tif instead of .tiff. Make sure to
also change param_load_videos
…On Wed, May 3, 2023, 10:06 AM leodiej ***@***.***> wrote:
ValueError Traceback (most recent call last)
Cell In[7], line 1
----> 1 varr = load_videos(dpath, **param_load_videos)
2 chk, _ = get_optimal_chk(varr, dtype=float)
File
C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:116,
in load_videos(vpath, pattern, dtype, downsample, downsample_strategy,
post_process)
114 movie_load_func = load_tif_lazy
115 else:
--> 116 raise ValueError("Extension not supported.")
118 varr_list = [movie_load_func(v) for v in vlist]
119 varr = darr.concatenate(varr_list, axis=0)
ValueError: Extension not supported.
—
Reply to this email directly, view it on GitHub
<#241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4YH57ID65AVBJYE66UVR3XEJQ5LANCNFSM6AAAAAAXUIDQ2E>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It is also possible minian cannot support the BigTiff format so you may
need a preprocessing step to divide up the file into smaller tifs.
…On Wed, May 3, 2023, 10:22 AM William Mau ***@***.***> wrote:
Try renaming your file extension to .tif instead of .tiff. Make sure to
also change param_load_videos
On Wed, May 3, 2023, 10:06 AM leodiej ***@***.***> wrote:
> ValueError Traceback (most recent call last)
> Cell In[7], line 1
> ----> 1 varr = load_videos(dpath, **param_load_videos)
> 2 chk, _ = get_optimal_chk(varr, dtype=float)
>
> File
> C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:116,
> in load_videos(vpath, pattern, dtype, downsample, downsample_strategy,
> post_process)
> 114 movie_load_func = load_tif_lazy
> 115 else:
> --> 116 raise ValueError("Extension not supported.")
> 118 varr_list = [movie_load_func(v) for v in vlist]
> 119 varr = darr.concatenate(varr_list, axis=0)
>
> ValueError: Extension not supported.
>
> —
> Reply to this email directly, view it on GitHub
> <#241 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AC4YH57ID65AVBJYE66UVR3XEJQ5LANCNFSM6AAAAAAXUIDQ2E>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I renamed the file extension to .tif and apriori it works. Thank you for your help. |
Hi. Set up Initial Basic Parameters#minian_path = "." Pre-processing Parameters#param_load_videos = { Motion Correction Parameters#subset_mc = None Initialization Parameters#param_seeds_init = { CNMF Parameters#param_get_noise = {"noise_range": (0.06, 0.5)} os.environ["OMP_NUM_THREADS"] = "1" varr = load_videos(dpath, **param_load_videos) KeyError Traceback (most recent call last) KeyError: b'\xa0\x00' During handling of the above exception, another exception occurred: TiffFileError Traceback (most recent call last) File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:118, in load_videos(vpath, pattern, dtype, downsample, downsample_strategy, post_process) File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:118, in (.0) File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:161, in load_tif_lazy(fname) File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\tifffile\tifffile.py:3144, in TiffFile.init(self, arg, mode, name, offset, size, _multifile, _useframes, _parent, **kwargs) TiffFileError: not a TIFF file b'\xa0\x00\xa0\n' |
Hello,
I am trying to perform the code with a tiff video. The file's name is "video conversion .tiff". Here is the code I ran and the error I get.
Set up Initial Basic Parameters#
minian_path = "."
dpath = "./inscopix_video/"
minian_ds_path = os.path.join(dpath, "minian")
intpath = "./fichier_intermediaire"
subset = dict(frame=slice(0, None))
subset_mc = None
interactive = True
output_size = 100
n_workers = int(os.getenv("MINIAN_NWORKERS", 4))
param_save_minian = {
"dpath": minian_ds_path,
"meta_dict": dict(session=-1, animal=-2),
"overwrite": True,
}
Pre-processing Parameters#
param_load_videos = {
"pattern": "video conversion[0].tiff",
"dtype": np.uint8,
"downsample": dict(frame=1, height=1, width=1),
"downsample_strategy": "subset",
}
param_denoise = {"method": "median", "ksize": 7}
param_background_removal = {"method": "tophat", "wnd": 15}
Motion Correction Parameters#
subset_mc = None
param_estimate_motion = {"dim": "frame"}
Initialization Parameters#
param_seeds_init = {
"wnd_size": 1000,
"method": "rolling",
"stp_size": 500,
"max_wnd": 15,
"diff_thres": 3,
}
param_pnr_refine = {"noise_freq": 0.06, "thres": 1}
param_ks_refine = {"sig": 0.05}
param_seeds_merge = {"thres_dist": 10, "thres_corr": 0.8, "noise_freq": 0.06}
param_initialize = {"thres_corr": 0.8, "wnd": 10, "noise_freq": 0.06}
param_init_merge = {"thres_corr": 0.8}
CNMF Parameters#
param_get_noise = {"noise_range": (0.06, 0.5)}
param_first_spatial = {
"dl_wnd": 10,
"sparse_penal": 0.01,
"size_thres": (25, None),
}
param_first_temporal = {
"noise_freq": 0.06,
"sparse_penal": 1,
"p": 1,
"add_lag": 20,
"jac_thres": 0.2,
}
param_first_merge = {"thres_corr": 0.8}
param_second_spatial = {
"dl_wnd": 10,
"sparse_penal": 0.01,
"size_thres": (25, None),
}
param_second_temporal = {
"noise_freq": 0.06,
"sparse_penal": 1,
"p": 1,
"add_lag": 20,
"jac_thres": 0.4,
}
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["OPENBLAS_NUM_THREADS"] = "1"
os.environ["fichier_intermediaire"] = intpath
The error is coming after this cell:
varr = load_videos(dpath, **param_load_videos)
chk, _ = get_optimal_chk(varr, dtype=float)
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 1
----> 1 varr = load_videos(dpath, **param_load_videos)
2 chk, _ = get_optimal_chk(varr, dtype=float)
File C:\ProgramData\Anaconda3\envs\minian2\lib\site-packages\minian\utilities.py:104, in load_videos(vpath, pattern, dtype, downsample, downsample_strategy, post_process)
100 vlist = natsorted(
101 [vpath + os.sep + v for v in os.listdir(vpath) if re.search(pattern, v)]
102 )
103 if not vlist:
--> 104 raise FileNotFoundError(
105 "No data with pattern {}"
106 " found in the specified folder {}".format(pattern, vpath)
107 )
108 print("loading {} videos in folder {}".format(len(vlist), vpath))
110 file_extension = os.path.splitext(vlist[0])[1]
FileNotFoundError: No data with pattern video conversion[0].tiff found in the specified folder C:\WINDOWS\system32\inscopix_video
The text was updated successfully, but these errors were encountered: