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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing labels in FER2013 test data #8118

Closed
dtafler opened this issue Nov 15, 2023 · 8 comments 路 Fixed by #8452
Closed

missing labels in FER2013 test data #8118

dtafler opened this issue Nov 15, 2023 · 8 comments 路 Fixed by #8452

Comments

@dtafler
Copy link

dtafler commented Nov 15, 2023

馃悰 Describe the bug

The file test.csv has no label column, so the labels in the test split all have value None:

from torchvision.datasets import FER2013
dat = FER2013(root='./', split='test')
print(dat[0][1])

Adding labels to the file raises a RuntimeError, presumably because of a resulting different md5 hash. The code above assumes the data has been downloaded from kaggle, as described in the source code.

Versions

PyTorch version: 2.1.1
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A

OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.10.0-26-amd64-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1650 Ti
Nvidia driver version: 520.61.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 165
Model name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Stepping: 2
CPU MHz: 1944.273
CPU max MHz: 5000.0000
CPU min MHz: 800.0000
BogoMIPS: 5199.98
Virtualization: VT-x
L1d cache: 192 KiB
L1i cache: 192 KiB
L2 cache: 1.5 MiB
L3 cache: 12 MiB
NUMA node0 CPU(s): 0-11
Vulnerability Gather data sampling: Vulnerable: No microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp pku ospke md_clear flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.26.0
[pip3] torch==2.1.1
[pip3] torchaudio==2.1.1
[pip3] torchvision==0.16.1
[pip3] triton==2.1.0
[conda] blas 1.0 mkl
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libjpeg-turbo 2.0.0 h9bf148f_0 pytorch
[conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-service 2.4.0 py311h5eee18b_1
[conda] mkl_fft 1.3.8 py311h5eee18b_0
[conda] mkl_random 1.2.4 py311hdb19cb5_0
[conda] numpy 1.26.0 py311h08b1b3b_0
[conda] numpy-base 1.26.0 py311hf175353_0
[conda] pytorch 2.1.1 py3.11_cuda11.8_cudnn8.7.0_0 pytorch
[conda] pytorch-cuda 11.8 h7e8668a_5 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torchaudio 2.1.1 py311_cu118 pytorch
[conda] torchtriton 2.1.0 py311 pytorch
[conda] torchvision 0.16.1 py311_cu118 pytorch

cc @pmeier

@pmeier
Copy link
Collaborator

pmeier commented Nov 16, 2023

Not sure what the ask is here:

  • Do you want us to provide labels? If so, we can't do that since there are non provided by the dataset we wrap here
  • Do you want us to allow using manually edited files with labels? If so, I'm against that. It goes against our current design to only wrap vanilla datasets without any modification from our side. You are right that the MD5 is causing the error for you. I think the simplest workaround here would be for you to copy the dataset and remove the md5=md5 parameter in
    if not check_integrity(str(data_file), md5=md5):

@dtafler
Copy link
Author

dtafler commented Nov 16, 2023

Thank you for the response. Copying and amending the dataset worked for me.
Regarding your first point, I believe providing the labels would in fact be possible. The directory of the dataset that you are wrapping contains a file 'fer2013.tar.gz', which when unpacked contains the entire dataset including test labels in the file 'fer2013.csv'.

@pmeier
Copy link
Collaborator

pmeier commented Nov 17, 2023

You are right, the fer2013.csv indeed contains all samples with the labels. We could potentially provide the test labels with that. Its a shame I didn't realize this when implementing the dataset. Now we are bound to BC and need to keep support for loading the training and test files individually. Meaning, the implementation will get a little messy. Still, I would accept a PR if someone is up for it.

@Bhavay-2001
Copy link

Hi @pmeier, is this a good-first issue? Can I contribute to this? I have pytorch knowledge.

@pmeier
Copy link
Collaborator

pmeier commented May 7, 2024

Yes, this is not too hard. Although PyTorch knowledge won't help you here. You need to wrangle some data.

@NicolasHug
Copy link
Member

Does this overlap with #8368 ?

@pmeier
Copy link
Collaborator

pmeier commented May 7, 2024

It seems so, yes. Although, when I looked into this last year, I found the labels in a different file then @NSalberg in #8368. See #8118 (comment).

@Bhavay-2001
Copy link

If this has already been resolved, are there any open issues in pytorch vision that are kind-of good first issue? @pmeier @NicolasHug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants