Giter Club home page Giter Club logo

Comments (7)

AidasK avatar AidasK commented on July 24, 2024 5

had same issue, it turns out it was the problem with images with multiple faces. It was fixed in prepare_au file with:

    for filepath in tqdm(filepaths):
        content = np.loadtxt(filepath, delimiter=', ', skiprows=1)
        if content.ndim == 1:
            data[os.path.basename(filepath[:-4])] = content[2:19]
        if content.ndim == 2:
            data[os.path.basename(filepath[:-4])] = content[0][2:19]
    return data

from ganimation.

albertpumarola avatar albertpumarola commented on July 24, 2024

Seems there is something wrong with your dataset. Check that the dimensions of each element of a sample are always the same.

from ganimation.

BugTan avatar BugTan commented on July 24, 2024

when the test sample size is 1, python will raise this error, you can add a special treat where there is only one test or train samples

from ganimation.

voa18105 avatar voa18105 commented on July 24, 2024

@xiaoiker check if there are images of zero size

from ganimation.

xiaoiker avatar xiaoiker commented on July 24, 2024

I checked our my images with the following code, found no zero size image. There are around 200K imgs.

input_path ='/homeappl/home/imgs'
files = glob.glob(input_path+'*.j*')
for n, img in enumerate(files):# /*.*
	try:
		var_img = cv2.imread(img) 
		height, weight, C = var_img.shape
		if (height != 128)|(weight != 128)|(C != 3):
			os.remove(img)
			print('Deleting file: {}'.format(img))
		else if var_img is None:
			os.remove(img)
			print('Deleting file: {}'.format(img))				

		print(n)
	
	except:
		os.remove(img)
		print('Deleting file: {}'.format(img))

I also checked the AUs files, found no abnormal. But still not work.

from ganimation.

huahuachenchen avatar huahuachenchen commented on July 24, 2024

@xiaoiker when load data in dataset_au.py, real_cond or desired_cond may have zero-sized dimensions, you can add a special treat, and I meet this problem and now success to train.

from ganimation.

yangzhikai avatar yangzhikai commented on July 24, 2024

@xiaoiker I have try the way proposed by (AidasK commented on 4 Sep),and This method is also applicable to the Celeba Dataset.

from ganimation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.