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

Failed to extract from image. Reason: bad allocation #6

Open
twt-mse opened this issue Jun 28, 2018 · 1 comment
Open

Failed to extract from image. Reason: bad allocation #6

twt-mse opened this issue Jun 28, 2018 · 1 comment

Comments

@twt-mse
Copy link

twt-mse commented Jun 28, 2018

Running 'python faceit.py preprocess fallon_to_oliver' results in the error:

'Failed to extract from image: C:\projects\faceit\data\processed\fallon _bank.mp4_frames\frame_000.jpg. Reason: bad allocation'

The video download and extraction of frames works correctly. The error occurs when the script tries to extract the faces from the frame images. From what I have tracked down the error happens in the extract.py at the call to 'self.get_faces(image)':

def handleImage(self, filename):
    count = 0
    image = cv2.imread(filename)
    for idx, face in self.get_faces(image):
        count = idx
        resized_image = self.extractor.extract(image, face, 256)
        output_file = get_folder(self.output_dir) / Path(filename).stem
        cv2.imwrite(str(output_file) + str(idx) + Path(filename).suffix, resized_image)
    return count + 1

Does anyone know why this happens?

@amilich
Copy link

amilich commented Oct 14, 2018

Did you ever figure out the solution to this?

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

2 participants