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

tensorflow 1.** #97

Open fdsig opened 3 years ago

fdsig commented 3 years ago

I Initially had issues as python3.8 virtual env. on Linux Ubuntu in the usual manner. Was able to fix by installing alternative version python3.7 and then all dependencies install

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7

update-alternatives --install /usr/bin/python python /usr/opt/python3.7  

virtualenv -p python3.7 contrib/**insert your path/and name for virtual environment)

source **insert/path/to/environment**/bin/activate 

pip install tensorflow==1.** 

as 3.8 later does not allow pip install earlier versions of TensorFlow (dependency hell) :-)

I have been reproducing results from all ava papers and bumping into same tf1/tf2 issues especially around the config module which the normal routes to solving tf1 code solve such as repressing tf2 behaviour vis a vis:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

and migrating code using:

tf_upgrade_v2 \
  --intree my_project/ \
  --outtree my_project_v2/ \
  --reportfile report.txt

useful links are:

https://www.tensorflow.org/guide/upgrade

https://www.tensorflow.org/guide/upgrade

Python alternative install on Linux:

https://medium.com/analytics-vidhya/how-to-install-and-switch-between-different-python-versions-in-ubuntu-16-04-dc1726796b9b

https://hackersandslackers.com/multiple-versions-python-ubuntu/

python source download urls:

https://www.python.org/ftp/python/3.7.0/

managing virtual environments Linux:

https://www.liquidweb.com/kb/creating-virtual-environment-ubuntu-16-04/

https://docs.python.org/3/library/venv.html

Krrish-Ie commented 1 year ago

not able to install tensorflow 1 any update on the current script?