Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError: [Errno 13] Permission denied: #178

Open
TirumalaManav opened this issue Sep 30, 2023 · 0 comments
Open

PermissionError: [Errno 13] Permission denied: #178

TirumalaManav opened this issue Sep 30, 2023 · 0 comments

Comments

@TirumalaManav
Copy link

After loading all the necessary libraries and modules, I attempted to run the code in the Jupyter notebook have encountered a few issues while attempting to execute the fourth cell in the Jupyter notebook.

PermissionError: [Errno 13] Permission denied: 'C:\Users\ursti\AppData\Local\Temp\tmptof1bz_y\tmp85y60kl3.py'

C:\Users\ursti\anaconda3\envs\JLB\lib\site-packages\mmcv\utils\registry.py:64: UserWarning: The old API of register_module(module, force=False) is deprecated and will be removed, please use the new API register_module(name=None, force=False, module=None) instead.
'The old API of register_module(module, force=False) '

PermissionError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_22416\177284914.py in
4 config_file = r"E:\DLTR\Testing\mmdetection\CascadeTabNet\Config\cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py"
5 checkpoint_file = r"E:\DLTR\Testing\mmdetection\epoch_36.pth"
----> 6 model = init_detector(config_file, checkpoint_file, device='cuda:0')
7
8 # Test a single image

c:\users\ursti\downloads\dltr\cascadetabnet\tablestructurerecognition\mmdetection\mmdet\apis\inference.py in init_detector(config, checkpoint, device)
26 """
27 if isinstance(config, str):
---> 28 config = mmcv.Config.fromfile(config)
29 elif not isinstance(config, mmcv.Config):
30 raise TypeError('config must be a filename or Config object, '

~\anaconda3\envs\JLB\lib\site-packages\mmcv\utils\config.py in fromfile(filename)
176 @staticmethod
177 def fromfile(filename):
--> 178 cfg_dict, cfg_text = Config._file2dict(filename)
179 return Config(cfg_dict, cfg_text=cfg_text, filename=filename)
180

~\anaconda3\envs\JLB\lib\site-packages\mmcv\utils\config.py in _file2dict(filename)
102 temp_config_name = osp.basename(temp_config_file.name)
103 shutil.copyfile(filename,
--> 104 osp.join(temp_config_dir, temp_config_name))
105 temp_module_name = osp.splitext(temp_config_name)[0]
106 sys.path.insert(0, temp_config_dir)

~\anaconda3\envs\JLB\lib\shutil.py in copyfile(src, dst, follow_symlinks)
119 else:
120 with open(src, 'rb') as fsrc:
--> 121 with open(dst, 'wb') as fdst:
122 copyfileobj(fsrc, fdst)
123 return dst

PermissionError: [Errno 13] Permission denied: 'C:\Users\ursti\AppData\Local\Temp\tmptof1bz_y\tmp85y60kl3.py'

**These are the code lines that I'm attempting to execute.

from mmdet.apis import init_detector, inference_detector, show_result_pyplot
Screenshot (156)
Screenshot (157)
Screenshot (158)

import mmcv

Load model

config_file = r"E:\DLTR\Testing\mmdetection\CascadeTabNet\Config\cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py"
checkpoint_file = r"E:\DLTR\Testing\mmdetection\epoch_36.pth"
model = init_detector(config_file, checkpoint_file, device='cuda:0')

Test a single image

img = r"E:\DLTR\Testing\mmdetection\CascadeTabNet\Demo\demo.png"

Run Inference

result = inference_detector(model, img)

Visualization results

show_result_pyplot(img, result,('Bordered', 'cell', 'Borderless'), score_thr=0.85)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant