Comments (6)
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.
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.
It should work on CPU. Could you provide the exact command you used and also the complete output of the script?
from kiss.
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.
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.
It worked.... Thanks....
from kiss.
Related Issues (18)
- MultiGPU HOT 1
- How do you generate the mask in transformer model and process text labels to "class_id" ? HOT 3
- What is the inference speed of KISS ? HOT 4
- Change the num_words_per_image without training again HOT 1
- Some of files in the link are not downloadable. HOT 3
- Use pretrained model and continue training on own data HOT 1
- what is gt.mat? HOT 2
- Pretrained model & Dataset HOT 1
- The data link is broken HOT 3
- Windows fatal exception: Access violation
- cannot install without a GPU HOT 9
- Training Text-Detection HOT 6
- Is it possible to use KISS on a test image? HOT 11
- SVT Evaluation HOT 1
- link to download SynAdd dataset.? HOT 4
- mjsynth.npz only has first letter of each word in "text" HOT 2
- Loss Functions HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiss.