question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preprocess RaFD dataset

See original GitHub issue

Hi, @yunjey I am confused about the method of preprocessing RaFD, where the download images have initial size 618 x 1024. If I crop the images to 256 x 256, some images became partial absent, especially when the camera angle is 45 degree or 135 degree.

So I crop the initial images as follow code:

elif dataset == 'RaFD':
    box = (100, 150, 600, 700)
    if mode == 'train':
        transform = transforms.Compose([
            transforms.Lambda(lambda x: x.crop(box)),
            transforms.Resize(image_size),
            transforms.RandomHorizontalFlip(),
            transforms.ToTensor(),
            transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
    else:
        transform = transforms.Compose([
            transforms.Lambda(lambda x: x.crop(box)),
            transforms.Resize(image_size),
            transforms.ToTensor(),
            transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
    dataset = ImageFolder(image_path, transform)

And I get some samples like sample

But I am not sure whether the method is right, could you help me? Thanks in advance.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Fairydetailcommented, Jul 4, 2018

Could you please share me with the RaFD datasets? Because I had apply it in the official website for several days, but I don’t receive an apply yet.Thanks a lot! @Sampson-Lee

0reactions
cy19980615commented, Mar 31, 2020

Hi, @yunjey I am confused about the method of preprocessing RaFD, where the download images have initial size 618 x 1024. If I crop the images to 256 x 256, some images became partial absent, especially when the camera angle is 45 degree or 135 degree. So I crop the initial images as follow code: elif dataset == ‘RaFD’: box = (100, 150, 600, 700) if mode == ‘train’: transform = transforms.Compose([ transforms.Lambda(lambda x: x.crop(box)), transforms.Resize(image_size), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) else: transform = transforms.Compose([ transforms.Lambda(lambda x: x.crop(box)), transforms.Resize(image_size), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) dataset = ImageFolder(image_path, transform)

And I get some samples like But I am not sure whether the method is right, could you help me? Thanks in advance.

hello could you share me with the RaFD dataset by mailbox:1647560307@qq.com i am Anxious to do graduation design for undergraduates,thanks very much!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

RaFD facial expression dataset sample. - ResearchGate
Ali et al. (2017) proposed a method for FER based on Histogram of Oriented Gradients (HOG) characteristics and applied it on KDEF and...
Read more >
RaFD Dataset - Papers With Code
The Radboud Faces Database (RaFD) is a set of pictures of 67 models (both adult and children, males and females) displaying 8 emotional...
Read more >
RAF-AU Database: In-the-Wild Facial Expressions with ...
a RAF-AU database that employs a sign-based (i.e., AUs) and judgement-based ... During pre-processing, manually annotated five facial.
Read more >
Preprocessing Command Text (FireDAC) - RAD Studio
Preprocessing Command Text (FireDAC) ... When calling Prepare, the FireDAC command preprocessor transforms the command text ... Advantage Database Server.
Read more >
FReeNet: Multi-Identity Face Reenactment, CVPR'20 - GitHub
txt , e.g. datasets/RaFD/RaFD90/landmark.txt . Preprocess RaFD dataset. > Split RaFD dataset to different dirs based on angle, e.g. RaFD45/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found