TractSeg icon indicating copy to clipboard operation
TractSeg copied to clipboard

Can the pretrained weights download folder be specified?

Open mgreen-neura opened this issue 1 year ago • 4 comments

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.

mgreen-neura avatar May 06 '24 07:05 mgreen-neura

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.

giovannividetta avatar May 14 '24 20:05 giovannividetta

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.

ZCGZ-7 avatar Aug 30 '24 02:08 ZCGZ-7

@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

giovannividetta avatar Aug 30 '24 07:08 giovannividetta

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: @.***>

ZCGZ-7 avatar Aug 31 '24 06:08 ZCGZ-7