Giter VIP home page Giter VIP logo

Comments (6)

Bartzi avatar Bartzi commented on May 23, 2024

Hi,
First, you'll need to tell our code where your evaluation files are in the config file.
Then, need to unpack the model, place the files in any dir (e.g. trained_models/pre_trained) and then you can run the script run_eval_on_all_datasets.py, as described in the Evaluation section of our README.

That should be it.

from kiss.

haaks1998 avatar haaks1998 commented on May 23, 2024

I don't have cuda compatible GPU... I'm trying to run the model on MacBook Pro 2018... How can I run the pertained model on CPU... I'm getting this runtime error.

RuntimeError: CUDA environment is not correctly set up
(see https://github.com/chainer/chainer#installation).No module named 'cupy'

from kiss.

Bartzi avatar Bartzi commented on May 23, 2024

It should work on CPU. Could you provide the exact command you used and also the complete output of the script?

from kiss.

haaks1998 avatar haaks1998 commented on May 23, 2024

I ran the following command (Pretrained model files are in model folder in project's root directory)

 python run_eval_on_all_datasets.py config.cfg 0 -b 1 --snapshot-dir model --render

And the Error I got is this:

Testing cute80
stripping non alpha
Traceback (most recent call last):
  File "evaluate.py", line 310, in <module>
    evaluator = Evaluator(args)
  File "evaluate.py", line 105, in __init__
    self.localizer.to_device(args.gpu)
  File "/opt/anaconda3/envs/env/lib/python3.8/site-packages/chainer/device_resident.py", line 196, in to_device
    device = chainer.get_device(device)
  File "/opt/anaconda3/envs/env/lib/python3.8/site-packages/chainer/backend.py", line 149, in get_device
    return _get_device_cupy_or_numpy(int_device_spec)
  File "/opt/anaconda3/envs/env/lib/python3.8/site-packages/chainer/backend.py", line 188, in _get_device_cupy_or_numpy
    return cuda.GpuDevice.from_device_id(device_spec)
  File "/opt/anaconda3/envs/env/lib/python3.8/site-packages/chainer/backends/cuda.py", line 228, in from_device_id
    check_cuda_available()
  File "/opt/anaconda3/envs/env/lib/python3.8/site-packages/chainer/backends/cuda.py", line 142, in check_cuda_available
    raise RuntimeError(msg)
RuntimeError: CUDA environment is not correctly set up
(see https://github.com/chainer/chainer#installation).No module named 'cupy'
Traceback (most recent call last):
  File "run_eval_on_all_datasets.py", line 114, in <module>
    subprocess.run([command, file] + process_args, check=True)
  File "/opt/anaconda3/envs/env/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'evaluate.py', '--gpu', '0', 'Eval_Datasets/CUTE80/gt.npz', 'model', 'LSTMTextLocalizer_', '--recognizer-name', 'TransformerTextRecognizer_', '--char-map', 'train_utils/char-map-bos.json', '--results-path', 'cute80_eval_results.json', '--dataset-name', 'cute80', '--strip-non-alpha', '--save-predictions', '--do-not-cut-bboxes', '--render-all-results', '-b', '1']' returned non-zero exit status 1.

from kiss.

Bartzi avatar Bartzi commented on May 23, 2024

Ah yes I see.

The script expects you to supply a GPU id (the argument following the config file). You supplied it with 0 so the script thinks, it should take the GPU with ID 0. If you want to use the CPU just supply -1 and it should work. If not, I might need to adapt the code, which is quite simply though.

Just exchange this by this statement: parser.add_argument("--gpu", default='cpu', help="GPU Id to use") and it should work.

from kiss.

haaks1998 avatar haaks1998 commented on May 23, 2024

It worked.... Thanks....

from kiss.

Related Issues (18)

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.