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

run "python demo.py" issue #2

Open
Jaypancool opened this issue Jan 28, 2018 · 4 comments
Open

run "python demo.py" issue #2

Jaypancool opened this issue Jan 28, 2018 · 4 comments

Comments

@Jaypancool
Copy link

When I run:
Python demo.py
it traceback:

  • jaypan@jaypan-X555LF:~/projects/SeqSLAM/pySeqSLAM/pyseqslam$ python demo.py
    Warning: Environment variable DATASET_1_PATH not found! Trying '../datasets/nordland/64x32-grayscale-1fps/spring'
    Warning: Environment variable DATASET_2_PATH not found! Trying '../datasets/nordland/64x32-grayscale-1fps/winter'
    Preprocessing dataset spring, indices 1 - 35601 ...
    /home/jaypan/projects/SeqSLAM/pySeqSLAM/pyseqslam/seqslam.py:139: RuntimeWarning: invalid value encountered in divide
    img[n[i]:n[i+1], m[j]:m[j+1]] = 127+np.reshape(np.round((pp-np.mean(pp))/np.std(pp, ddof=1)), (s, s))
    Traceback (most recent call last):
    File "demo.py", line 99, in
    demo()
    File "demo.py", line 82, in demo
    results = ss.run()
    File "/home/jaypan/projects/SeqSLAM/pySeqSLAM/pyseqslam/seqslam.py", line 22, in run
    results = self.doPreprocessing()
    File "/home/jaypan/projects/SeqSLAM/pySeqSLAM/pyseqslam/seqslam.py", line 60, in doPreprocessing
    savemat(filename, {'results_preprocessing': results_preprocessing})
    File "/usr/local/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 204, in savemat
    file_stream = open(file_name, 'wb')
    IOError: [Errno 2] No such file or directory: 'results/preprocessing-spring-1-100-35601.mat'
    What's the wrong?
@marsywhuang
Copy link

Hi Jaypancool
Try to give a subdirectory, which name is results, under pyseqslam directory

@Ahmedest61
Copy link

I'm facing following error when I run the demo.py script
"""
v = D[a:b, :]
TypeError: slice indices must be integers or None or have an index method
"""
Is any of you came across this error?

@hmishra2250
Copy link

The solution is to create a results directory inside the pyseqslam directory and then run demo. It will automatically take care of the rest.

@LYRen1900
Copy link

I'm facing following error when I run the demo.py script
"""
v = D[a:b, :]
TypeError: slice indices must be integers or None or have an index method
"""
Is any of you came across this error?

Hi, Ahmedest61.
line 189 and 190 in pyseqslam.py , it is should be changed as: "a=np.max((0, i-self.params.contrastEnhancement.R//2))
b=np.min((D.shape[0], i+self.params.contrastEnhancement.R//2+1)) "
line246 in pyseqslam.py , it is should be changed as :"for N in range(self.params.matching.ds//2, DD.shape[1]-self.params.matching.ds//2): "

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

5 participants