Skip to content

This is the website for a group-project aimed at assessing the quality of images using the subjective (rating-based) approach.

License

Notifications You must be signed in to change notification settings

aiman-al-masoud/image_quality_assessment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMAGE QUALITY ASSESSMENT

License: MIT

Jupyter Notebook HTML5 CSS3 Python JavaScript

Introduction

This is the website for a group-project aimed at assessing the quality of images using the subjective (rating-based) approach.

Our website https://siqa.pythonanywhere.com is currently live and reachable.

all-devices-black


Be VERY CAREFUL when you push anything to this repo, as the WEBHOOK THAT AUTOMATICALLY REFRESHES THE SERVER may be active at any time.


Other

IMPORTANT NOTICE (about flask, please read it)

Flask is the Python web-framework currently being used to develop the back-end of this website. It's simple and easy to use if you know some basic Python.

(But if anyone has any better proposals for a web framework in Python or Java, please notify the rest).

Linking Resources:

Flask requires a special syntax to link static resources to html-templates.

All of the static resources are to be placed in the 'static' folder, and eventually in sub-folders.

Example (linking a css file in html):

<link href="{{url_for('static', filename='stylesheets/general.css')}}" rel="stylesheet" type="text/css">

(This will tell flask to fetch general.css in the specified location within the static folder).

Links (hrefs):

Relative links to any part of this website must be specified according to the names defined in the python decorators for the methods in app.py.

Examples:

# this gets called when the homepage (plain web-address) is requested.
@app.route("/")
def on_index():
  pass

# this gets called when: webaddress/take_test is requested.
@app.route("/take_test")
def on_take_test():
   pass

More about flask:

https://flask-restful.readthedocs.io/en/latest/quickstart.html

(or Stackoverflow).

That's all, thank you for taking the time to read this!

SETTING UP A LOCAL TESTING ENVIRONMENT

1) Clone this repo

...and navigate to its root directory.

2) Create a python virtual environment

...calling it '.my_env'

(For gitignore-related reasons).

$ python3 -m venv .my_env

(You'll be prompted to install the 'venv' module if you don't have it yet).

3) Activate the virtual environment:

$ source ./my_env/bin/activate

If this command doesn't work try with:

$ . .my_env/bin/activate

(You should notice that the console starts displaying the virtual environment's name before your username and the dollar-sign).

4) Install this app's dependencies

... on the virtual environment you just created:

(.my_env)$ pip install -r requirements.txt

5) Run the app on localhost!

(.my_env)$ python3 -m flask run

Sample output:

 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Click on the link, and the homepage will be launched on your default browser.

TIPS

To avoid a lot of frustration while debugging this, please try to turn caching off on your favourite browser: