GithubHelp home page GithubHelp logo

makingl / music_recommendation Goto Github PK

View Code? Open in Web Editor NEW
66.0 2.0 23.0 73.63 MB

协同过滤 音乐推荐 深度学习 音乐检索 Docker

License: MIT License

HTML 6.50% PHP 59.24% Python 9.91% JavaScript 11.06% CSS 6.73% Dockerfile 0.63% TSQL 5.92%

music_recommendation's Introduction

协同过滤音乐推荐 (Docker 部署)

协同过滤 音乐推荐 深度学习 音乐检索 Docker


@[toc]

介绍

项目主要工作在 Million Song Dataset 数据集下基于 Pythonscikit-surprise 库实现了基于协同过滤的音乐推荐,还有用 CNN (卷积神经网络) 实现相似音乐推荐。

其中,协同过滤主要基于 Python scikit-surprise 库的 文档(Documents) 写的协同过滤算法, 所采用的数据集的原因,协同过滤出来的指标比较低,系统中协同过滤的结果采用三个算法输出的结果投票。

另外就是参照下面的参考项目做了基于深度学习的音乐推荐,该项目主要实现相似相似旋律的音乐推荐。其主要通过 CNN 对音乐音频信息进行特征提取,然后对提取后的特征向量与实现保存好的一些音乐特征向量进行相似度匹配,将相似度最高的几首音乐作为推荐结果。该方法可以用于音乐检索,音乐防抄袭等领域。

本项目特有的部分是,将上述两种方法融合,并写了个 web 展示效果。由于 Million Song Dataset 数据集没有歌曲内容信息,本人找了某易云的爬虫代码,建立 Million Song Dataset 数据集中的音乐 id 与 某易云的音乐 id 的映射(期间被封过 IP)。然后将音乐的内容进行时频转换后,送入卷积神经网络,得到歌曲特征向量,通过特征向量的相似度匹配,找出相似的音乐信息。

参考项目

  1. 中文地址

    私人定制——使用深度学习Keras和TensorFlow打造一款音乐推荐系统

  2. 英文地址

    building a music recommender with deep learning

微信小程序版实现

本项目的微信小程序版实现: Github LE7ELS/music_recommendation_miniapp

技术栈

  • Python Flask + Tensorflow + scikit-surprise
  • PHP/MySQL/HTML/CSS/JQuery

Docker 部署

依赖

  • Docker
  • Docker-compose

运行步骤

  1. clone 此项目 git clone [email protected]:MakingL/music_recommendation.git, cd music_recommendation

  2. git fetch --all, 切换到分支 git checkout docker-config

  3. 启动 docker 容器: docker-compose up -d

  4. 导入数据库,PHPMyAdmin 导入 SQL 文件不能超过 2M,建议用 Navicat 导入

    • 浏览器访问 PHPMyAdmin: http://localhost:8080/ (此处的地址 localhost 应根据实际情况而定)
    • root 用户密码: tiger
    • 新建数据库, 注意编码为 utf8mb4
      • 数据库名: music_recommender
      • 用户名: music_system (注意给权限)
      • 密码: music_system
    • 导入数据 vender/DataBase/music_recommender.sql 到该数据库
  5. 在浏览器中访问网站 http://localhost/,预置的登录用户:

    • 用户名: admin, 密码: admin123
    • 用户名: root, 密码: root1234

运行界面

  • 用户登录

用户登录

  • 协同过滤推荐

协同过滤推荐 协同过滤推荐2

  • 搜索歌曲

搜索歌曲

  • 播放歌曲

播放歌曲

  • CNN推荐结果

CNN推荐结果

相关资源推荐

  1. 提供免费音乐的音乐库网站

  2. 推荐系统研究中的九大数据集

  3. 推荐系统基础知识 --- Github

music_recommendation's People

Contributors

dependabot[bot] avatar makingl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

music_recommendation's Issues

docker-compose up -d项目构建时报错

$ docker-compose up -d
[+] Building 4.9s (10/19)
=> [music_recommendation_webserver internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [music_recommendation_webserver internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.56kB 0.0s
=> [music_recommendation_recommend_servce internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 539B 0.0s
=> [music_recommendation_recommend_servce internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [music_recommendation_recommend_servce internal] load metadata for docker.io/library/python:3.6.8 1.6s
=> [music_recommendation_webserver internal] load metadata for docker.io/library/php:5.6-apache 1.7s
=> CANCELED [music_recommendation_recommend_servce 1/6] FROM docker.io/library/python:3.6.8@sha256:f20a9bfddd87c238c3d2316b417922 3.1s
=> => resolve docker.io/library/python:3.6.8@sha256:f20a9bfddd87c238c3d2316b4179222f219090cbb25d5b6975070d4dd4b75004 0.1s
=> => sha256:e2b625c433e2e3c9a72eb92483c7e6ebe32163e320258f6a60badc44d9eb2806 2.22kB / 2.22kB 0.0s
=> => sha256:48c06762acf0bb8fa6a7f10686f3430cc3d149cf798556c138a82ded6c61e438 7.38kB / 7.38kB 0.0s
=> => sha256:6f2f362378c5a6fd915d96d11dda1e0223ccf213bf121ace56ae0f6616ea1dc8 15.73MB / 45.34MB 3.1s
=> => sha256:7596bb83081b6c8410df557d538a0ae45922cbf81e469c6f4cfa835247cb24ab 4.34MB / 4.34MB 3.0s
=> => sha256:f20a9bfddd87c238c3d2316b4179222f219090cbb25d5b6975070d4dd4b75004 2.38kB / 2.38kB 0.0s
=> => sha256:494c27a8a6b820f9167ec7e368b3a9bb47d7029f4dc8c97c67091f3757a5bc4e 0B / 10.79MB 3.1s
=> [music_recommendation_recommend_servce internal] load build context 0.0s
=> => transferring context: 3.23kB 0.0s
=> CACHED [music_recommendation_webserver 1/6] FROM docker.io/library/php:5.6-apache@sha256:0a40fd273961b99d8afe69a61a68c73c04bc0 0.0s
=> ERROR [music_recommendation_webserver 2/6] RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.l 3.1s

[music_recommendation_webserver 2/6] RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list && apt-get clean && apt-get -y update:
#15 0.407 Ign:1 http://mirrors.aliyun.com/debian stretch InRelease
#15 0.495 Ign:2 http://mirrors.aliyun.com/debian stretch-updates InRelease
#15 0.584 Ign:3 http://mirrors.aliyun.com/debian stretch Release
#15 0.644 Ign:4 http://security.debian.org/debian-security stretch/updates InRelease
#15 0.674 Ign:5 http://mirrors.aliyun.com/debian stretch-updates Release
#15 0.736 Ign:6 http://security.debian.org/debian-security stretch/updates Release
#15 0.764 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 0.829 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 0.853 Ign:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 0.924 Ign:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 0.941 Ign:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 1.019 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 1.028 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 1.116 Ign:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 1.118 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 1.206 Ign:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 1.213 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 1.291 Ign:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 1.313 Ign:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 1.377 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 1.415 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 1.468 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 1.513 Ign:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 1.607 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 1.647 Ign:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 1.701 Ign:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 1.746 Ign:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 1.796 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
#15 1.841 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 1.890 Err:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#15 1.890 404 Not Found [IP: 151.101.130.132 80]
#15 1.929 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 2.013 Ign:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 2.104 Ign:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 2.199 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 2.288 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 2.376 Ign:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 2.465 Ign:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 2.559 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 2.662 Ign:7 http://mirrors.aliyun.com/debian stretch/main all Packages
#15 2.756 Err:9 http://mirrors.aliyun.com/debian stretch/main amd64 Packages
#15 2.756 404 Not Found [IP: 124.225.13.238 80]
#15 2.841 Err:11 http://mirrors.aliyun.com/debian stretch-updates/main amd64 Packages
#15 2.841 404 Not Found [IP: 124.225.13.238 80]
#15 2.928 Ign:12 http://mirrors.aliyun.com/debian stretch-updates/main all Packages
#15 2.939 Reading package lists...
#15 2.945 W: The repository 'http://mirrors.aliyun.com/debian stretch Release' does not have a Release file.
#15 2.945 W: The repository 'http://mirrors.aliyun.com/debian stretch-updates Release' does not have a Release file.
#15 2.945 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
#15 2.945 E: Failed to fetch http://mirrors.aliyun.com/debian/dists/stretch/main/binary-amd64/Packages 404 Not Found [IP: 124.225.13.238 80]
#15 2.945 E: Failed to fetch http://mirrors.aliyun.com/debian/dists/stretch-updates/main/binary-amd64/Packages 404 Not Found [IP: 124.225.13.238 80]
#15 2.945 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.130.132 80]
#15 2.945 E: Some index files failed to download. They have been ignored, or old ones used instead.


failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g\" /etc/apt/sources.list && apt-get clean && apt-get -y update" did not complete successfully: exit code: 100

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.