face-generator icon indicating copy to clipboard operation
face-generator copied to clipboard

Error while running

Open quintendewilde opened this issue 8 years ago • 11 comments

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`.

quintendewilde avatar Apr 27 '17 21:04 quintendewilde

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

aleju avatar Apr 29 '17 17:04 aleju

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

quintendewilde avatar Apr 29 '17 18:04 quintendewilde

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.

aleju avatar Apr 29 '17 20:04 aleju

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

quintendewilde avatar Apr 29 '17 21:04 quintendewilde

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

Hanimiao avatar Nov 01 '17 02:11 Hanimiao

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

Hanimiao avatar Nov 01 '17 03:11 Hanimiao

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

aleju avatar Nov 01 '17 09:11 aleju

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

cestdoe avatar Dec 17 '17 15:12 cestdoe

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.

aleju avatar Dec 18 '17 18:12 aleju

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

cestdoe avatar Dec 23 '17 13:12 cestdoe

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.

aleju avatar Dec 26 '17 13:12 aleju