idealo / image-quality-assessment

Convolutional Neural Networks to predict the aesthetic and technical quality of images.
https://idealo.github.io/image-quality-assessment/
Apache License 2.0
2.09k stars 447 forks source link

No module named 'sklearn' #108

Closed brunohppl closed 1 year ago

brunohppl commented 1 year ago

Hi there, I might be missing something basic here.

When trying to run the sample local training: `sudo ./train-local \

--config-file $(pwd)/models/MobileNet/config_technical_cpu.json \ --samples-file $(pwd)/data/TID2013/tid_labels_train.json \ --image-dir`

I get an error: File "/src/trainer/train.py", line 5, in <module> from sklearn.model_selection import train_test_split ModuleNotFoundError: No module named 'sklearn'

brunohppl commented 1 year ago

In the ‘Dockerfile.cpu’ there is a line 'RUN pip install -r requirements.txt'. When looking at the /image-quality-assessment/src/requirements.txt, it only adds sklearn. After adding scikit-learn to the file, and building the image once again, the dependency is installed properly