Missing QA tiles create empty labels at country boundaries

未关闭
#106 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
jupyter-notebook, keras, numpy, python

调研方向

从 issue 中的 label_maker 配置开始,复现生成的 data.npz,然后检查提供的 Jupyter Notebook 中针对 x_train 和 y_train 的检查。跟踪 classes、background_ratio、zoom 和国家 bounding box 如何生成瓦片标签。完成的标准是确定该行为属于 bug、配置问题还是 OSM 数据限制,并记录证据或下一步 fix。

由索引模型根据 Issue 内容生成。

描述

After seeing really poor results in my ResNet50 I have manually inspected the data and labels and it appears that the background images label_maker is producing are labelled almost randomly.

Here's the config that I'm using:

{
  "country": "singapore",
  "bounding_box": [103.5917,1.132909,104.10712,1.487815],
  "zoom": 14,
  "classes": [{ "name": "human construction", "filter": ["any", ["has", "man_made"], ["has", "military"], ["has", "building"], ["has", "aerialway"], ["has", "aeroway"], ["in", "landuse", "allotments", "brownfield", "cemetery", "commercial", "construction", "depot", "farmland", "farmyard", "garages", "greenhouse_horticulture", "industrial", "landfill", "military", "orchard", "plant_nursery", "port", "quarry", "railway", "recreation_ground", "religious", "residential", "retail", "village_green", "vineyard"] ] } ],
  "imagery": "http://a.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=###(removed)",
  "background_ratio": 1,
  "ml_type": "classification"
}

Essentially what I've attempted to do in the above 'classes' is to identify tiles with any sign of human activity.
At that zoom level around 300 images are packaged in to data.npz.
Once we have the data.npz file a quick inspection of some of the imagery with the following code (I used a Jupyter Notebook) shows a high proportion of the images are labelled as not in the class above despite very clearly containing man made structures.

import numpy as np
import os
# load data
npz = np.load('final_singa/data.npz')
x_train = npz['x_train']
y_train = npz['y_train']
x_test = npz['x_test']
y_test = npz['y_test']

# check out labels for first 25 images:
for i in range(0,25):
    print('row:',i)
    fig = plt.subplots(nrows=1, ncols=1, figsize=(10, 10))
    plt.imshow(x_train[i])
    if y_train[i][0] == 1:
        plt.title(str('No man made'))
    else:
        plt.title(str('Yes man made'))
    plt.tight_layout
    plt.show()
    plt.pause(0.0001)

I also tried at zoom level 15 and the same issue exists.
I'm wondering a few things:
Is the class I'm using too complex to use label-maker for this purpose?
Is the OSM tiling simply unreliable?
Is there a bug in label maker?
Am I using background_ratio incorrectly?
Am I making a stupid mistake somewhere?

Any advice greatly appreciated!

Thanks
Josh

主要语言
Python
星标
471
派生
106
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

developmentseed/label-maker 的其他 Issue

查看 developmentseed/label-maker 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。