Comments (9)
The code is having problems downloading the model weights from zenodo. Sometimes zenodo is having download issues. I would suggest to try it again another time and/or from another internet network.
from tractseg.
Thanks a lot! I fixed the problem. The following commands runned correctly:
TractSeg -i peaks.nii.gz -o template/tract_segmentation/ --output_type tract_segmentation
TractSeg -i peaks.nii.gz -o template/endings_segmentation/ --output_type endings_segmentation
But, when I try to run "TractSeg -i peaks.nii.gz -o template/TOM/ --output_type TOM" , There is no file in TOM folder and I get the following error:
Error:
Loading weights from: /home/gha/.tractseg/pretrained_weights_peak_regression_part1_v2.npz
100%|█████████████████████████████████████████| 144/144 [00:22<00:00, 6.44it/s]
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/gha/miniconda3/lib/python3.9/site-packages/nibabel/loadsave.py", line 42, in load
stat_result = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: 'template/TOM/bundle_segmentations/AF_left.nii.gz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 428, in _process_worker
r = call_item()
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 275, in call
return self.fn(*self.args, **self.kwargs)
.
.
.
.
FileNotFoundError: No such file or no access: 'template/TOM/bundle_segmentations/AF_left.nii.gz'
from tractseg.
Is this the complete error message? There seems to be missing something.
from tractseg.
This is the complete error message:
TractSeg -i peaks.nii.gz -o template/TOM/ --output_type TOM
Loading weights from: /home/gha/.tractseg/pretrained_weights_peak_regression_part1_v2.npz
Downloading pretrained weights (~140MB) ...
downloaded in 913.93s
100%|████████████████████████████████████████| 144/144 [00:23<00:00, 6.24it/s]
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/gha/miniconda3/lib/python3.9/site-packages/nibabel/loadsave.py", line 42, in load
stat_result = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: 'template/TOM/bundle_segmentations/AF_left.nii.gz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 428, in _process_worker
r = call_item()
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 275, in call
return self.fn(*self.args, **self.kwargs)
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 620, in call
return self.func(*args, **kwargs)
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/parallel.py", line 288, in call
return [func(*args, **kwargs)
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/parallel.py", line 288, in
return [func(*args, **kwargs)
File "/home/gha/miniconda3/lib/python3.9/site-packages/tractseg/libs/peak_utils.py", line 263, in _process_bundle
img = nib.load(join(tract_seg_path, bundle + ".nii.gz"))
File "/home/gha/miniconda3/lib/python3.9/site-packages/nibabel/loadsave.py", line 44, in load
raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: 'template/TOM/bundle_segmentations/AF_left.nii.gz'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gha/miniconda3/bin/TractSeg", line 420, in
main()
File "/home/gha/miniconda3/bin/TractSeg", line 325, in main
seg = run_tractseg(data, args.output_type,
File "/home/gha/miniconda3/lib/python3.9/site-packages/tractseg/python_api.py", line 240, in run_tractseg
seg = peak_utils.mask_and_normalize_peaks(seg, tract_segmentations_path,
File "/home/gha/miniconda3/lib/python3.9/site-packages/tractseg/libs/peak_utils.py", line 271, in mask_and_normalize_peaks
results_peaks = Parallel(n_jobs=nr_cpus)(delayed(_process_bundle)(idx, bundle)
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/parallel.py", line 1098, in call
self.retrieve()
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/parallel.py", line 975, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/gha/miniconda3/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 567, in wrap_future_result
return future.result(timeout=timeout)
File "/home/gha/miniconda3/lib/python3.9/concurrent/futures/_base.py", line 445, in result
return self.__get_result()
File "/home/gha/miniconda3/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
FileNotFoundError: No such file or no access: 'template/TOM/bundle_segmentations/AF_left.nii.gz'
from tractseg.
For the previous commands (output type tract_segmentation and endings_segmentations) you have to specify the same output folder. And for output_type TOM as well. The correct subfolders are automatically generated. Just do it the same way as it is stated in the documentation.
from tractseg.
Problem solved. Thank you very much for your help.
from tractseg.
Hi,
I met the same problem as yours, could you please tell me how did you solve the Failed to establish a new connection: [Errno 111] Connection refused'))
? Just changed the internet network?
from tractseg.
Hi,
Yes, we just changed the internet network.
from tractseg.
Thanks! I solved the problem. I also try to apply TractSeg to the study specific population template. I've done whole brain fixel-based analysis according to the MRtrix3 document. And I got some significant FC, FD, FDC fixels between 3 of my groups. Now I would like to label those tracts which have significant fixels. I followed this scripts https://osf.io/9ch6a, ran the following commands
sh2peaks wmfod_template_MNI.mif peaks.nii.gz TractSeg -i peaks.nii.gz -o tractseg/ --output_type tract_segmentation TractSeg -i peaks.nii.gz -o tractseg/ --output_type endings_segmentation TractSeg -i peaks.nii.gz -o tractseg/ --output_type TOM Tracking -i peaks.nii.gz -o tractseg/ --tracking_format tck --nr_fibers 10000
The given scripts is an Tract-of-interest analysis, I"d to do whole brain analysis, and I want to know what's the next step according to my goal?
Seems you are also doing the FBA, I would appreciate it if you could give me some guidance.
Yuting
from tractseg.
Related Issues (20)
- Error in train endings_segmentation.
- Error in train TOM.
- Downloading pretrained weights (~140MB) seven times for every subject...can we have a better solution
- Creating peaks (1 of 3)... ; dwi2response: [ERROR] mrconvert
- bundle segmentation works but endings segmentation are all zeros HOT 1
- No tracking found for bundle. Returning zeros
- xvfbwrapper missing after pip install
- Issues creating endpoint files
- Issues with Matching the 72 reference Tract Folder number to the corresponding HCP Dataset IDs/Subject number HOT 1
- Seeking Advice on Achieving Symmetrical TOIs Using TractSeg
- plot_tractometry_results --plot3D metric gives ValueError HOT 5
- plot_tractometry_results --plot3D error: ValueError: data must be 2 dimensions HOT 1
- zsh: segmentation fault HOT 2
- Great overlap between the arcuate fasciculus (AF) and the superior longitudinal fasciculus (SLF) II HOT 2
- Can the pretrained weights download folder be specified? HOT 1
- TractSeg stopping midway with no error HOT 1
- --super_resolution flag not working HOT 2
- Using pre-downloaded pre-trained weights HOT 1
- plot3D clarification
- Problem Generating 3D Plots
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tractseg.