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

Error while running #1

Open
quintendewilde opened this issue Apr 27, 2017 · 11 comments
Open

Error while running #1

quintendewilde opened this issue Apr 27, 2017 · 11 comments

Comments

@quintendewilde
Copy link

quintendewilde commented Apr 27, 2017

I'm getting following error.

 python generate_dataset.py --path="/Users/myusername/Facegenerator/openface/data/dcgan-completion.tensorflow/data/lfw"
[Warning] directory '/Users/myusername/Facegenerator/openface/data/dcgan-completion.tensorflow/data/lfw' contained 1 files with extension differing from 'jpg'
Found 13233 images total.
Image 0...
Traceback (most recent call last):
  File "generate_dataset.py", line 195, in <module>
    main()
  File "generate_dataset.py", line 48, in main
    brightness_change=0.1, noise_mean=0.0, noise_std=0.00)
  File "generate_dataset.py", line 130, in augment
    arr = tf.warp(img, matrix, mode="nearest") # projects to float 0-1
  File "/usr/local/lib/python2.7/site-packages/skimage/transform/_warps.py", line 775, in warp
    order=order, mode=mode, cval=cval))
  File "skimage/transform/_warps_cy.pyx", line 94, in skimage.transform._warps_cy._warp_fast (skimage/transform/_warps_cy.c:2557)
ValueError: Invalid mode specified.  Please use `constant`, `edge`, `wrap`, `reflect` or `symmetric`.

@aleju
Copy link
Owner

aleju commented Apr 29, 2017

I think that error comes from an outdated skimage version, try pip install --upgrade scikit-image

@quintendewilde
Copy link
Author

Upgraded it and got new errors...
Very stranged because I followed the installation just 3days ago so it's also strange that it's outdated... Though I am new at this, probably oversaw something.

tests.openface_demo_tests.test_classification_demo_training ... FAIL
tests.openface_neural_net_training_tests.test_dnn_training ... FAIL

======================================================================
FAIL: tests.openface_batch_represent_tests.test_batch_represent
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/root/openface/tests/openface_batch_represent_tests.py", line 40, in test_batch_represent
    lfwSubset), "Get lfw-subset by running ./data/download-lfw-subset.sh"
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh

======================================================================
FAIL: tests.openface_demo_tests.test_classification_demo_training
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/root/openface/tests/openface_demo_tests.py", line 70, in test_classification_demo_training
    assert os.path.isdir(lfwSubset), 'Get lfw-subset by running ./data/download-lfw-subset.sh'
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh

======================================================================
FAIL: tests.openface_neural_net_training_tests.test_dnn_training
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/root/openface/tests/openface_neural_net_training_tests.py", line 38, in test_dnn_training
    lfwSubset), "Get lfw-subset by running ./data/download-lfw-subset.sh"
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh

----------------------------------------------------------------------
Ran 7 tests in 17.939s

@aleju
Copy link
Owner

aleju commented Apr 29, 2017

These errors don't look to me like they come from my scripts? Apparently they request you to execute /data/download-lfw-subset.sh in order to download the LFW dataset.
Are you sure this is the project that you used three days ago? It looks like you are trying to do something with OpenFace.

@quintendewilde
Copy link
Author

Yeah I found a stack page with it have something to do with my command line tools probably.

@Hanimiao
Copy link

Hanimiao commented Nov 1, 2017

I would like to ask you how to solve this problem?

@Hanimiao
Copy link

Hanimiao commented Nov 1, 2017

ValueError: Invalid mode specified. Please use constant, edge, wrap, reflect or symmetric.
What does this mean? Do you know what caused it?

@aleju
Copy link
Owner

aleju commented Nov 1, 2017

Try upgrading your scipy and scikit-image, I think that error pops up with outdated versions. I.e. do something like: sudo pip install --upgrade scipy scikit-image

@cestdoe
Copy link

cestdoe commented Dec 17, 2017

I had the same error as described above. @aleju, please checkout the script dataset/generate_dataset.py in line 130, I changed the value of mode to 'constant' and It runs until stops at another error in line 40, currently the value is 'nearest', as the error says that value is invalid.

Source: http://scikit-image.org/docs/stable/api/skimage.transform.html#warp

@aleju
Copy link
Owner

aleju commented Dec 18, 2017

Fixed the one in line 130, thanks for the info.
What other error are you getting? generate_dataset.py seems to run fine for me. Probably some problem with a newer version of a library. I currently can't update here, so I can't check that.

@cestdoe
Copy link

cestdoe commented Dec 23, 2017

error

OS: Windows 10 Home
Python: 2.7.14
Terminal: Windows Powershell of Visual Studio Code version 1.19.1
command: python .\generate_dataset.py --path="../lfw" (lfw is in the root of repository)
cwd: repo_root/dataset

@aleju
Copy link
Owner

aleju commented Dec 26, 2017

Hm not sure what your problem here is. That stacktrace isn't very useful and stops at a point where it shouldn't throw an IOError. I just tried executing the script and get way past image 27. The best I could find online was that it seems to be an error that can sometimes pop up in windows when reading and writing to the same file, but that shouldn't be the case here.

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

4 participants