MIC-DKFZ / TractSeg

Automatic White Matter Bundle Segmentation
Apache License 2.0
227 stars 76 forks source link

Can the pretrained weights download folder be specified? #271

Open mgreen-neura opened 6 months ago

mgreen-neura commented 6 months ago

Can I specify where the pre-trained weight files are saved?

By default, they are downloaded into the user's home directory but it then exceeds my home directory storage quota. It would be fantastic if I could direct the download to the current working directory.

giovannividetta commented 5 months ago

Hi, @mgreen-neura!

From TractSeg FAQs:

Can I save the pretrained weights at a different location?

Per default the pretrained weights will be downloaded to and loaded from ~/.tractseg/. You can change this directory by adding weights_dir=/absolute/path_to_where/you_want_it to ~/.tractseg/config.txt in a new line (if the file does not exist yet you have to create it). Normally the pretrained weights will automatically be downloaded in the background right when they are needed. In some cases you might want to download all of them at once. To do so you can simply run download_all_pretrained_weights and the weights will be download to ~/.tractseg/ or the location you specified in ~/.tractseg/config.txt.

ZCGZ-7 commented 2 months ago

Hi, @mgreen-neura!

From TractSeg FAQs:

Can I save the pretrained weights at a different location?

Per default the pretrained weights will be downloaded to and loaded from ~/.tractseg/. You can change this directory by adding weights_dir=/absolute/path_to_where/you_want_it to ~/.tractseg/config.txt in a new line (if the file does not exist yet you have to create it). Normally the pretrained weights will automatically be downloaded in the background right when they are needed. In some cases you might want to download all of them at once. To do so you can simply run download_all_pretrained_weights and the weights will be download to ~/.tractseg/ or the location you specified in ~/.tractseg/config.txt. Hi, @giovannividetta How can I specify or find my config.txt, beacause it does not exit in /.tractseg. I got a problem that pretrained*.npz is empty. Altough I download it manually from zenodo, TractSeg command seems
still will ask a request.

giovannividetta commented 2 months ago

@ZCGZ-7 you have to create “config.txt” manually and write within it the pathway where you would like to download the weights. I just read Q&A reported by Wasserthal

ZCGZ-7 commented 2 months ago

thanks a lot. I made it work

---- Replied Message ---- | From | Giovanni @.> | | Date | 08/30/2024 15:07 | | To | MIC-DKFZ/TractSeg @.> | | Cc | ZCGZ-7 @.>, Mention @.> | | Subject | Re: [MIC-DKFZ/TractSeg] Can the pretrained weights download folder be specified? (Issue #271) |

@ZCGZ-7 you have to create “config.txt” manually and write within it the pathway where you would like to download the weights. I just read Q&A reported by Wasserthal

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>