neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.57k stars 898 forks source link

num_samples should be a positive integer value, but got num_samples=0 #309 #426

Closed wuXiuSen closed 1 year ago

wuXiuSen commented 1 year ago

when i try train ,i get a error

... AttributeError: 'EfficientNet' object has no attribute 'act1'

i solve it

get another error

num_samples should be a positive integer value, but got num_samples=0

i try follow way like Originally posted by @1YasserAmmar1 in https://github.com/neuralchen/SimSwap/issues/307#issuecomment-1200092061 ................... thin just change the train start code by add the batchsize value --batchSize 4 .............

!python train.py --name simswap224_test --batchSize 4 --gpu_ids 0 --dataset ./content/TrainingData/vggface2_crop_arcfacealign_224 --Gdeep Fals

it still error ,help

SassyRong commented 1 year ago

I've also encountered this error, and here I made a very stupid mistake. If you're using a windows environment, don't use WinRAR to extract the dataset (I haven't tried other software, but WinRAR can extract a file but this file can't be used for training), use tar -xvzf path/to/vggface2_crop_arcfacealign_224.tar instead!

shidalao commented 1 year ago

Here is the solution:

  1. "AttributeError: 'EfficientNet' object has no attribute 'act1'", it can be solved by @1YasserAmmar1 in #307
  2. "num_samples should be a positive integer value, but got num_samples=0", add this command before training, !mv /content/vggface2_crop_arcfacealign_224/ /content/TrainingData/vggface2_crop_arcfacealign_224
neuralchen commented 1 year ago

This bug in Colab script has been fixed, please try the new version Colab!

jigneshk5 commented 3 months ago

I've also encountered this error, and here I made a very stupid mistake. If you're using a windows environment, don't use WinRAR to extract the dataset (I haven't tried other software, but WinRAR can extract a file but this file can't be used for training), use tar -xvzf path/to/vggface2_crop_arcfacealign_224.tar instead!

image In collab, we are getting this error when trying to extract the training dataset

L-XY-L commented 1 month ago

AttributeError: 'EfficientNet' object has no attribute 'act1',How did this work out, please?