Ethan-syc / FloorDog

This is the repo for Duke University COMPSCI 316 Introduction to Databases's team project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project FloorDog

Project Description:

This is the repo for Duke University COMPSCI 316 Introduction to Databases's team project.
It is a full-stack web project that use database with machine learning algorithms to provide searching and recommendation functionality for dressing fashion.

License:

This repo should be under MIT license

Brief overview of code structure:

CSVs directory stores the major data sources of FloorDog.
website directory stores the Django app website. Important files are:
1. forms.py: sets up forms that will be sent in our browser,
2. views.py: controls the execution and function of FloorDog.
3. models.py: database schema
4. urls.py: controls how each type of url's parameter, correlated views.py method, and name for reverse() function.
5. rec_tools.py and related programs for recommendation as well as neural network training.
6. static directory stores the images, css, javascript, fonts for our HTMLs.
7. template/website directory stores our HTML templates.
8. support directory stores the training weight of FloorDog's color recognition and category prediction neural network.
upload directory stores the Dropzone.js implementation of our Drag and Drop file-uploading function.
venv directory stores the nesccesry file for Django execution.
project316 directory stores the major python program that set up the Django environment, including settings.py.

Transfer the database:

Make sure postgreSQL is already installed in your environment.
In your postgreSQL environment, type in "create database project316"
After the database have been set up, return to terminal and try to run the server by inputing "python mange.py runserver" under FloorDog directory.
If error occures, open project316/settings.py, and made related changes in the code for implementing database. In most case, delete the line of USER and PASSWORD would be sufficient.
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'project316', 'USER': 'shunnnli', 'PASSWORD': 'xxxxxx', 'HOST': 'localhost', 'PORT': 5432, } } If the server can be run suffecessfully, open FloorDog/create.sql, change the command into your own path.
copy website_modelName from '/path/to/csv/file.csv' with delimiter ',' NULL as E'''' CSV; Either run the changed create.sql, or just open the postgreSQL shell, and copy each command into the shell. Sucessful transferation should be visibale through the prompt.

Adjust the neural network:

If you want to adjust the training weight of FloorDog's neural network, you can find it in website/support directory.

Open FloorDog

To open FloorDog, firstly make sure the uploaded_files directory at FloorDog/website/uploaded_files is being emptyed.
Then, open the terminal/pyCharm, make sure the current directory is FloorDog, and typed in the commend "python manage.py runserver".
Open the local host address provided in the prompt, which should be http://127.0.0.1:8000/
FloorDog should now be opened and ready to use in your browser.

Limitation of current implementation:

The most significant limitation is that we still run FloorDog on local host, which hugely limites its capabilities.
The database on postgreSQL is also not shared. We need to create a new project316 database on each new computer that runs FloorDog.

Tree of FloorDog directory:

Documents/GitHub/FloorDog
├── CSVs
│   ├── description.txt
│   ├── men.csv
│   ├── men_color.csv
│   ├── men_des_dict.csv
│   ├── women.csv
│   ├── women_color.csv
│   └── women_mat_dict.csv
├── README.md
├── pycache
├── category.txt
├── create.sql
├── manage.py
├── project316
│   ├── Scrapping
│   │   ├── color_recognition.py
│   │   ├── comb_scrapping.py
│   │   ├── des_dict.py
│   │   ├── encode_comb.py
│   │   ├── get_comb_url.py
│   │   ├── get_img_url.py
│   │   ├── get_product_description.py
│   │   ├── get_product_url.py
│   │   ├── item_scrapping.py
│   │   ├── merge_csv.py
│   │   ├── scrape.py
│   │   ├── scrapping_tools.py
│   │   ├── ssense.py
│   │   ├── ssense_with_comb.py
│   │   └── test.py
│   ├── init.py
│   ├── pycache
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── requirements.txt
├── templates
├── upload
│   ├── init.py
│   ├── pycache
│   ├── admin.py
│   ├── apps.py
│   ├── forms.py
│   ├── migrations
│   ├── models.py
│   ├── recommend.py
│   ├── static
│   │   └── upload
│   │   ├── css
│   │   │   ├── basic.css
│   │   │   ├── dropzone.css
│   │   │   └── stylus
│   │   ├── images
│   │   └── js
│   │   ├── dropzone-amd-module.js
│   │   ├── dropzone-amd-module.min.js
│   │   ├── dropzone.js
│   │   └── dropzone.min.js
│   ├── templates
│   │   └── upload
│   │   └── index.html
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── venv
│   ├── bin
│   │   ├── pycache
│   │   │   └── django-admin.cpython-37.pyc
│   │   ├── activate
│   │   ├── activate.csh
│   │   ├── activate.fish
│   │   ├── django-admin
│   │   ├── django-admin.py
│   │   ├── easy_install
│   │   ├── easy_install-3.7
│   │   ├── pip
│   │   ├── pip3
│   │   ├── pip3.7
│   │   ├── python
│   │   ├── python3
│   │   └── python3.7
│   ├── include
│   ├── lib
│   │   └── python3.7
│   │   └── site-packages
│   ├── pip-selfcheck.json
│   └── pyvenv.cfg
└── website
├── init.py
├── pycache
├── admin.py
├── apps.py
├── color_recognition_tool.py
├── fas_resnet_pred.py
├── forms.py
├── id_lists
├── migrations
├── models.py
├── rec_tools.py
├── recommend.py
├── static
│   ├── css
│   │   ├── animate.css
│   │   ├── bootstrap.min.css
│   │   ├── classy-nav.min.css
│   │   ├── core-style.css
│   │   ├── core-style.css.map
│   │   ├── customize.css
│   │   ├── font-awesome.min.css
│   │   ├── jquery-ui.min.css
│   │   ├── magnific-popup.css
│   │   ├── nice-select.css
│   │   ├── owl.carousel.css
│   │   └── style.css
│   ├── fonts
│   ├── img
│   │   ├── bg-img
│   │   ├── core-img
│   │   ├── hover-img
│   │   ├── icon-img
│   │   └── product-img
│   ├── js
│   ├── scss
│   └── website
│   └── images
├── support
│   ├── fas_resnet101_men_100000.pt
│   ├── fas_resnet101_women_100000.pt
│   ├── men_complete_coding.csv
│   └── women_complete_coding.csv
├── templates
│   └── website
│   ├── detail_page.html
│   ├── filter_page.html
│   ├── filter_result.html
│   ├── index.html
│   ├── upload_gender.html
│   ├── upload_page.html
│   └── upload_result.html
├── templatetags
├── tests.py
├── uploaded_files
├── urls.py
└── views.py

58 directories, 229 files

About

This is the repo for Duke University COMPSCI 316 Introduction to Databases's team project.


Languages

Language:Python 43.6%Language:JavaScript 34.2%Language:CSS 17.1%Language:HTML 4.6%Language:Shell 0.5%