Giter Site home page Giter Site logo

penghaowu95 / urbanregionfunctionclassification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from czczup/urbanregionfunctionclassification

0.0 1.0 0.0 945 KB

第五届百度西交大大数据竞赛 城市区域功能分类 Baseline

Jupyter Notebook 99.70% Python 0.30%

urbanregionfunctionclassification's Introduction

城市区域功能分类

简介

模型结构图

同时使用遥感图像和访问数据两个模态,在特征层进行融合,大概能拿到0.55的准确率。

PS:刚刚测试了一下,有0.57分。

tensorboard

快速起步

1.1 依赖的库

tensorflow-gpu==1.8
opencv-python
pandas 

1.2 数据准备

将数据放在data文件夹下,如下所示:

  • data/test_image/test/xxxxxx.jpg
  • data/test_visit/test/xxxxxx.txt
  • data/train_image/train/00x/xxxxxx_00x.jpg
  • data/train_visit/xxxxxx_00x.txt

把压缩文件放在data文件夹里直接解压应该就是上面这样。

我把给的训练集划分了一部分当验证集,具体过程看check_data.ipynb。

划分后的文件名记录在data/train.txt和data/valid.txt中。

1.3 数据转换

把visit数据转换为7x26x24的矩阵,这一步耗时比较长,大概要一个小时。

python visit2array.py

转换后的数据存储在:

  • data/npy/train_visit
  • data/npy/test_visit

1.4 生成tfrecord

python tfrecord.py

生成的tfrecord存储在:

  • data/tfrecord/train.tfrecord
  • data/tfrecord/valid.tfrecord

1.5 训练

python train.py

为了调参方便,每组实验存在不同的文件夹里。 需要输入显卡的编号和文件夹名称,比如:

device id: 0
dir id: 1001

查看tensorboard:

cd model/
tensorboard --logdir=./

1.6 测试

python test.py

测试完成后在result文件夹中生成结果。

实测分数

urbanregionfunctionclassification's People

Contributors

czczup avatar

Watchers

James Cloos avatar

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.