aiXander / CLIP_assisted_data_labeling

Repository to quickly label lots of images using CLIP embeddings
15 stars 3 forks source link

about _3_label_images.py #1

Open kkiskkk opened 1 year ago

kkiskkk commented 1 year ago

Hello, in _3_label_images.py, does using the number keys [0-9] on the keyboard to label images mean that the number of label categories is limited to 10 or less? And I tried using the arrow keys to go forward and back and it doesn't work, is there something wrong?

aiXander commented 1 year ago

Yeah, for now the regression labels are limited to 0-9 but this could be easily extended if needed. The actual label assignment happens here: https://github.com/aiXander/CLIP_assisted_data_labeling/blob/main/_3_label_images.py#L321

So the actual label value is the number/10. I should prob add a normalization in the training code so it always divides by the maximum label value in the dataset so the labels are [0.0-1.0], but I dont think it matters that much, the biases in the last layer of the FC-network will adapt anyway.

The keys to go back and forward work for me, but that might be specific to my keyboard + OS (I'm running this on ubuntu). You could add a print statement here https://github.com/aiXander/CLIP_assisted_data_labeling/blob/main/_3_label_images.py#L319 to eg print(key) and see what your arrow keys are actually bound to and see if maybe on your system they are not 81 and 83 but something else. I probably need to create a keyboard mapper class that has different mappings depending on which OS you're running...

Feel free to send a pr, I can prob look at this next week!

kkiskkk commented 1 year ago

Thank you for your patient reply, I will continue to study your project.