Code Monkey home page Code Monkey logo

Comments (4)

kshitijkapadni avatar kshitijkapadni commented on August 18, 2024

PyTorch = 1.4.0
Torchvision = 0.5.0
Cuda = 10.0

These are the recommended versions to be used. The issue is probably due to the CUDA version mismatch or it is unable to find the CUDA runtime as per given below:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2'

from cascadetabnet.

ankur7721 avatar ankur7721 commented on August 18, 2024

Thanks for your reply @kshitijkapadni. I am able to resolve some part of the error[Cuda error] but main error still persists.

and this error comes in this line

model = init_detector(config_file, checkpoint_path, device='cuda:0')

here's the updated error message


---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
~\AppData\Local\Continuum\anaconda3\envs\vision\lib\site-packages\mmcv\utils\config.py in _file2dict(filename)
     91                 shutil.copyfile(filename,
---> 92                                 osp.join(temp_config_dir, temp_config_name))
     93                 temp_module_name = osp.splitext(temp_config_name)[0]

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\shutil.py in copyfile(src, dst, follow_symlinks)
    120         with open(src, 'rb') as fsrc:
--> 121             with open(dst, 'wb') as fdst:
    122                 copyfileobj(fsrc, fdst)

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\ABC\\AppData\\Local\\Temp\\tmpk364o8er\\tmpdvxuk41c.py'

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-4-1bf7d6119595> in <module>
      1 # build the model from a config file and a checkpoint file
----> 2 model = init_detector(config_file, checkpoint_path, device='cuda:0')

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

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\site-packages\mmcv\utils\config.py in fromfile(filename)
    163     @staticmethod
    164     def fromfile(filename):
--> 165         cfg_dict, cfg_text = Config._file2dict(filename)
    166         return Config(cfg_dict, cfg_text=cfg_text, filename=filename)
    167 

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\site-packages\mmcv\utils\config.py in _file2dict(filename)
    103                 del sys.modules[temp_module_name]
    104                 # close temp file
--> 105                 temp_config_file.close()
    106         elif filename.endswith(('.yml', '.yaml', '.json')):
    107             import mmcv

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\tempfile.py in __exit__(self, exc, value, tb)
    807 
    808     def __exit__(self, exc, value, tb):
--> 809         self.cleanup()
    810 
    811     def cleanup(self):

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\tempfile.py in cleanup(self)
    811     def cleanup(self):
    812         if self._finalizer.detach():
--> 813             _shutil.rmtree(self.name)

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\shutil.py in rmtree(path, ignore_errors, onerror)
    492             os.close(fd)
    493     else:
--> 494         return _rmtree_unsafe(path, onerror)
    495 
    496 # Allow introspection of whether or not the hardening against symlink

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\shutil.py in _rmtree_unsafe(path, onerror)
    391         os.rmdir(path)
    392     except OSError:
--> 393         onerror(os.rmdir, path, sys.exc_info())
    394 
    395 # Version using fd-based APIs to protect against races

~\AppData\Local\Continuum\anaconda3\envs\vision\lib\shutil.py in _rmtree_unsafe(path, onerror)
    389                 onerror(os.unlink, fullname, sys.exc_info())
    390     try:
--> 391         os.rmdir(path)
    392     except OSError:
    393         onerror(os.rmdir, path, sys.exc_info())

OSError: [WinError 145] The directory is not empty: 'C:\\Users\\ABC\\AppData\\Local\\Temp\\tmpk364o8er'

from cascadetabnet.

ankur7721 avatar ankur7721 commented on August 18, 2024

To add further into my findings, Error is coming into this function of line 91.

from cascadetabnet.

AyanGadpal avatar AyanGadpal commented on August 18, 2024

Hey @ankur7721 , I think you should try this

from cascadetabnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.