BrainMaGe
BrainMaGe copied to clipboard
Does this project support running on win10 system?
What changes would be required if the project were to run on Windows 10?
Nothing, this should work on Windows.
This is my first time using the git command(my system is Win10). After I download git software, I run
git clone https://github.com/CBICA/BrainMaGe.git
successfully。
But when I execute the XXX command git lfs pull
,The following error was encountered
`Error updating the git index: (0/2), 148 MB | 23 KB/s
error: BrainMaGe/init.py: cannot add to the index - missing --add option?
fatal: Unable to process path BrainMaGe/init.py
Errors logged to C:\Users\x\BrainMaGe.git\lfs\logs\20211105T170409.6038543.log
Use git lfs logs last
to view the log.
batch response: Post "https://github.com/CBICA/BrainMaGe.git/info/lfs/objects/batch": read tcp 192.xxx.xxx.6:58853->20.205.243.xxx:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
cannot write data to tempfile "C:\Users\x\BrainMaGe\.git\lfs\incomplete\7eff7f10d541c5f2204b6e3882ea1070698c11e10a3d77918589692e36e0cf1c4123608929": LFS: read tcp 192.xxx.xxx.6:59111->185.xxx.xxx.xxx:443: i/o timeout
error: failed to fetch some objects from 'https://github.com/CBICA/BrainMaGe.git/info/lfs'
`
I don't know what went wrong.
Any help would be greatly appreciated.
Hey,
I am able to run the same instructions:
(base) PS C:\Users\tester> cd .\Downloads\test_brainmage\
(base) PS C:\Users\tester\Downloads\test_brainmage> git clone https://github.com/CBICA/BrainMaGe.git
Cloning into 'BrainMaGe'...
remote: Enumerating objects: 1009, done.
remote: Counting objects: 100% (291/291), done.
remote: Compressing objects: 100% (195/195), done.
remote: Total 1009 (delta 170), reused 183 (delta 96), pack-reused 718
Receiving objects: 100% (1009/1009), 241.65 KiB | 3.36 MiB/s, done.
Resolving deltas: 100% (614/614), done.
(base) PS C:\Users\tester\Downloads\test_brainmage> cd BrainMaGe
(base) PS C:\Users\tester\Downloads\test_brainmage\BrainMaGe> git lfs pull
(base) PS C:\Users\tester\Downloads\test_brainmage\BrainMaGe> conda env create -f requirements.yml
Collecting package metadata (repodata.json): done
Have you installed Git-LFS? If not, can you install and try the command once again?
I downloaded git-lfs and executed the following command at Git Bash: `x@DESKTOP-xxx MINGW64 ~/BrainMaGe (master) $ git lfs install Updated git hooks. Git LFS initialized.
x@DESKTOP-xxx MINGW64 ~/BrainMaGe (master) $ git lfs pull Downloading LFS objects: 0% (0/1), 30 MB | 33 KB/s Downloading LFS objects: 0% (0/1), 30 MB | 33 KB/s
Downloading LFS objects: 0% (0/1), 38 MB | 14 KB/s
Error updating the git index: (0/1), 65 MB | 13 KB/s error: BrainMaGe/init.py: cannot add to the index - missing --add option? fatal: Unable to process path BrainMaGe/init.py
Errors logged to xxx\BrainMaGe.git\lfs\logs\20211106T140903.7362199.log
Use git lfs logs last
to view the log.
batch response: Post "https://github.com/CBICA/BrainMaGe.git/info/lfs/objects/batch": dial tcp xx.xxx.x.16xx6:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
error: failed to fetch some objects from 'https://github.com/CBICA/BrainMaGe.git/info/lfs'
`
I googled the error and the answer is this: https://github.com/git-lfs/git-lfs/issues/3457 It is a pity that I am not able to solve it. I think the operation mode of your project is similar to PyRadiommics, but it is difficult for me as a novice to operate Git, so I may have to find other ways to remove the skull.
You could try using wget directly:
cd BrainMaGe
wget https://github.com/CBICA/BrainMaGe/raw/master/BrainMaGe/weights/resunet_ma.pt ./BrainMaGe/weights
wget https://github.com/CBICA/BrainMaGe/raw/master/BrainMaGe/weights/resunet_multi_4.pt ./BrainMaGe/weights
Example:
(base) user@cbica-bakas-pc06:/mnt/c/Users/user/Downloads$ wget https://github.com/CBICA/BrainMaGe/raw/master/BrainMaGe/weights/resunet_ma.pt .
--2021-11-06 09:57:24-- https://github.com/CBICA/BrainMaGe/raw/master/BrainMaGe/weights/resunet_ma.pt
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://media.githubusercontent.com/media/CBICA/BrainMaGe/master/BrainMaGe/weights/resunet_ma.pt [following]
--2021-11-06 09:57:24-- https://media.githubusercontent.com/media/CBICA/BrainMaGe/master/BrainMaGe/weights/resunet_ma.pt
Resolving media.githubusercontent.com (media.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.108.133, ...
Connecting to media.githubusercontent.com (media.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33215195 (32M) [application/octet-stream]
Saving to: ‘resunet_ma.pt’
resunet_ma.pt 100%[==========================================================>] 31.68M 13.3MB/s in 2.4s
2021-11-06 09:57:27 (13.3 MB/s) - ‘resunet_ma.pt’ saved [33215195/33215195]
--2021-11-06 09:57:27-- http://./
Resolving . (.)... failed: No address associated with hostname.
wget: unable to resolve host address ‘.’
FINISHED --2021-11-06 09:57:29--
Total wall clock time: 5.0s
Downloaded: 1 files, 32M in 2.4s (13.3 MB/s)
This should give you the model weights without using LFS.