You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I first tried out the package, I got always following exception
Traceback (most recent call last):
File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/.lwcc/weights'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./crowd_counting.py", line 53, in <module>
results = count(args.img_path)
File "./crowd_counting.py", line 38, in count
count, density = LWCC.get_count(
File "/home/jmkrieger/.local/lib/python3.8/site-packages/lwcc/LWCC.py", line 65, in get_count
model = load_model(model_name, model_weights)
File "/home/jmkrieger/.local/lib/python3.8/site-packages/lwcc/LWCC.py", line 31, in load_model
model = model.make_model(model_weights)
File "/home/jmkrieger/.local/lib/python3.8/site-packages/lwcc/models/CSRNet.py", line 13, in make_model
output = weights_check("CSRNet", model_weights)
File "/home/jmkrieger/.local/lib/python3.8/site-packages/lwcc/util/functions.py", line 17, in weights_check
Path("/.lwcc/weights").mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.8/pathlib.py", line 1292, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/.lwcc'
I traced the error and found that the function weights_check in lwcc/util/functions.py tried to create the folder designated for the downloaded weights in the root folder, and not the home directory.
I could easily fixed it for me by changing the function to
defweights_check(model_name, model_weights):
home=str(Path.home())
# create dir if does not existsPath(os.path.join(home, ".lwcc/weights")).mkdir(parents=True, exist_ok=True)
# download weights if not availablefile_name="{}_{}.pth".format(model_name, model_weights)
url=build_url(file_name)
output=os.path.join(home, ".lwcc/weights/", file_name)
# [...]
Thank you for creating this package - it's quite mindblowing what today's neural networks can achieve!
The text was updated successfully, but these errors were encountered:
Hi,
when I first tried out the package, I got always following exception
I traced the error and found that the function
weights_check
inlwcc/util/functions.py
tried to create the folder designated for the downloaded weights in the root folder, and not the home directory.I could easily fixed it for me by changing the function to
Thank you for creating this package - it's quite mindblowing what today's neural networks can achieve!
The text was updated successfully, but these errors were encountered: