Permalink
Browse files

rename package to prevent colision

  • Loading branch information...
ocourtin committed Nov 29, 2018
1 parent 61b7748 commit 8b224e31c92969063c346f69862e093ada42c10e
Showing with 60 additions and 60 deletions.
  1. +0 −6 robosat/__init__.py
  2. +0 −6 robosat/tools/__init__.py
  3. +6 −0 robosat_pink/__init__.py
  4. 0 {robosat → robosat_pink}/colors.py
  5. 0 {robosat → robosat_pink}/config.py
  6. +1 −1 {robosat → robosat_pink}/datasets.py
  7. 0 {robosat → robosat_pink}/features/__init__.py
  8. +1 −1 {robosat → robosat_pink}/features/core.py
  9. 0 {robosat → robosat_pink}/log.py
  10. 0 {robosat → robosat_pink}/losses/lovasz.py
  11. 0 {robosat → robosat_pink}/metrics.py
  12. 0 {robosat → robosat_pink}/models/albunet.py
  13. 0 {robosat → robosat_pink}/osm/__init__.py
  14. +1 −1 {robosat → robosat_pink}/osm/building.py
  15. 0 {robosat → robosat_pink}/osm/core.py
  16. 0 {robosat → robosat_pink}/osm/road.py
  17. 0 {robosat → robosat_pink}/spatial/__init__.py
  18. 0 {robosat → robosat_pink}/spatial/core.py
  19. 0 {robosat → robosat_pink}/tiles.py
  20. +6 −0 robosat_pink/tools/__init__.py
  21. +1 −1 {robosat → robosat_pink}/tools/__main__.py
  22. +6 −6 {robosat → robosat_pink}/tools/compare.py
  23. +1 −1 {robosat → robosat_pink}/tools/cover.py
  24. +1 −1 {robosat → robosat_pink}/tools/dedupe.py
  25. +3 −3 {robosat → robosat_pink}/tools/download.py
  26. +3 −3 {robosat → robosat_pink}/tools/export.py
  27. 0 {robosat → robosat_pink}/tools/extract.py
  28. +2 −2 {robosat → robosat_pink}/tools/features.py
  29. +8 −8 {robosat → robosat_pink}/tools/predict.py
  30. +5 −5 {robosat → robosat_pink}/tools/rasterize.py
  31. +3 −3 {robosat → robosat_pink}/tools/subset.py
  32. 0 {robosat → robosat_pink}/tools/templates/compare.html
  33. 0 {robosat → robosat_pink}/tools/templates/leaflet.html
  34. +3 −3 {robosat → robosat_pink}/tools/tile.py
  35. +7 −7 {robosat → robosat_pink}/tools/train.py
  36. 0 {robosat → robosat_pink}/transforms.py
  37. +1 −1 {robosat → robosat_pink}/utils.py
  38. +1 −1 rsp

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,6 @@
"""RoboSat.pink - semantic segmentation on imagery.
QoD and features extraction
For available command line tools see the `robosat_pink.tools` sub-package.
"""
File renamed without changes.
File renamed without changes.
@@ -13,7 +13,7 @@
import cv2
import numpy as np

from robosat.tiles import tiles_from_slippy_map, buffer_tile_image
from robosat_pink.tiles import tiles_from_slippy_map, buffer_tile_image


# Single Slippy Map directory structure
@@ -2,7 +2,7 @@
import numpy as np
from PIL import Image

from robosat.tiles import pixel_to_location
from robosat_pink.tiles import pixel_to_location


def contours_to_mask(contours, shape):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@
import geojson
import shapely.geometry

from robosat.osm.core import is_polygon
from robosat_pink.osm.core import is_polygon


class BuildingHandler(osmium.SimpleHandler):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,6 @@
"""RoboSat.pink sub-package for command line tools.
The package's tools and their sub-command help pages can be seen via:
python3 -m robosat_pink.tools --help
"""
@@ -2,7 +2,7 @@

import argparse

from robosat.tools import (
from robosat_pink.tools import (
compare,
cover,
dedupe,
@@ -11,12 +11,12 @@

from mercantile import feature

from robosat.colors import make_palette, complementary_palette
from robosat.tiles import tiles_from_slippy_map, tile_image
from robosat.config import load_config
from robosat.metrics import Metrics
from robosat.utils import web_ui
from robosat.log import Log
from robosat_pink.colors import make_palette, complementary_palette
from robosat_pink.tiles import tiles_from_slippy_map, tile_image
from robosat_pink.config import load_config
from robosat_pink.metrics import Metrics
from robosat_pink.utils import web_ui
from robosat_pink.log import Log


def add_parser(subparser):
@@ -8,7 +8,7 @@
from mercantile import tiles
from supermercado import burntiles

from robosat.datasets import tiles_from_slippy_map
from robosat_pink.datasets import tiles_from_slippy_map


def add_parser(subparser):
@@ -7,7 +7,7 @@

import shapely.geometry

from robosat.spatial.core import make_index, iou
from robosat_pink.spatial.core import make_index, iou


def add_parser(subparser):
@@ -9,9 +9,9 @@
from tqdm import tqdm
from mercantile import xy_bounds

from robosat.tiles import tiles_from_csv, fetch_image
from robosat.utils import web_ui
from robosat.log import Log
from robosat_pink.tiles import tiles_from_csv, fetch_image
from robosat_pink.utils import web_ui
from robosat_pink.log import Log


def add_parser(subparser):
@@ -6,8 +6,8 @@
import torch.autograd
import torch.nn as nn

from robosat.config import load_config
from robosat.unet import UNet
from robosat_pink.config import load_config
from robosat_pink.models.albunet import AlbuNet


def add_parser(subparser):
@@ -43,7 +43,7 @@ def main(args):
def map_location(storage, _):
return storage.cpu()

net = UNet(num_classes, num_channels=num_channels).to("cpu")
net = AlbuNet(num_classes, num_channels=num_channels).to("cpu")
chkpt = torch.load(args.checkpoint, map_location=map_location)
net = torch.nn.DataParallel(net)
net.load_state_dict(chkpt["state_dict"])
File renamed without changes.
@@ -10,8 +10,8 @@
from pathlib import Path
from importlib import import_module

from robosat.config import load_config
from robosat.tiles import tiles_from_slippy_map
from robosat_pink.config import load_config
from robosat_pink.tiles import tiles_from_slippy_map


def add_parser(subparser):
@@ -13,13 +13,13 @@
from tqdm import tqdm
from PIL import Image

from robosat.datasets import BufferedSlippyMapDirectory
from robosat.tiles import tiles_from_slippy_map
from robosat.unet import UNet
from robosat.config import load_config
from robosat.colors import continuous_palette_for_color, make_palette
from robosat.transforms import ImageToTensor
from robosat.utils import web_ui
from robosat_pink.datasets import BufferedSlippyMapDirectory
from robosat_pink.tiles import tiles_from_slippy_map
from robosat_pink.models.albunet import AlbuNet
from robosat_pink.config import load_config
from robosat_pink.colors import continuous_palette_for_color, make_palette
from robosat_pink.transforms import ImageToTensor
from robosat_pink.utils import web_ui


def add_parser(subparser):
@@ -59,7 +59,7 @@ def map_location(storage, _):
# https://github.com/pytorch/pytorch/issues/7178
chkpt = torch.load(args.checkpoint, map_location=map_location)

net = UNet(num_classes).to(device)
net = AlbuNet(num_classes).to(device)
net = nn.DataParallel(net)

net.load_state_dict(chkpt["state_dict"])
@@ -16,11 +16,11 @@
from supermercado import burntiles
from shapely.geometry import mapping

from robosat.config import load_config
from robosat.colors import make_palette, complementary_palette
from robosat.tiles import tiles_from_csv
from robosat.utils import web_ui
from robosat.log import Log
from robosat_pink.config import load_config
from robosat_pink.colors import make_palette, complementary_palette
from robosat_pink.tiles import tiles_from_csv
from robosat_pink.utils import web_ui
from robosat_pink.log import Log


def add_parser(subparser):
@@ -6,9 +6,9 @@
from glob import glob
from tqdm import tqdm

from robosat.tiles import tiles_from_csv
from robosat.utils import web_ui
from robosat.log import Log
from robosat_pink.tiles import tiles_from_csv
from robosat_pink.utils import web_ui
from robosat_pink.log import Log


def add_parser(subparser):
@@ -15,9 +15,9 @@
from rasterio.warp import transform_bounds, calculate_default_transform
from rasterio.transform import from_bounds

from robosat.config import load_config
from robosat.colors import make_palette
from robosat.utils import web_ui
from robosat_pink.config import load_config
from robosat_pink.colors import make_palette
from robosat_pink.utils import web_ui


def add_parser(subparser):
@@ -15,20 +15,20 @@

from tqdm import tqdm

from robosat.transforms import (
from robosat_pink.transforms import (
JointCompose,
JointTransform,
JointResize,
JointRandomFlipOrRotate,
ImageToTensor,
MaskToTensor,
)
from robosat.datasets import SlippyMapTilesConcatenation
from robosat.metrics import Metrics
from robosat.losses.lovasz import LovaszLoss
from robosat.models.albunet import AlbuNet
from robosat.config import load_config
from robosat.log import Log
from robosat_pink.datasets import SlippyMapTilesConcatenation
from robosat_pink.metrics import Metrics
from robosat_pink.losses.lovasz import LovaszLoss
from robosat_pink.models.albunet import AlbuNet
from robosat_pink.config import load_config
from robosat_pink.log import Log


@contextmanager
File renamed without changes.
@@ -4,7 +4,7 @@
import json
from pathlib import Path
from mercantile import feature
from robosat.tiles import pixel_to_location
from robosat_pink.tiles import pixel_to_location


def web_ui(out, base_url, coverage_tiles, selected_tiles, ext, template):
2 rsp
@@ -1,3 +1,3 @@
#!/bin/sh

python3 -m robosat.tools "$@"
python3 -m robosat_pink.tools "$@"

0 comments on commit 8b224e3

Please sign in to comment.