mapbox / robosat

Semantic segmentation on aerial and satellite imagery. Extracts features such as: buildings, parking lots, roads, water, clouds
MIT License
2.01k stars 382 forks source link

rs command doesnt works #201

Closed balla-999 closed 4 years ago

balla-999 commented 4 years ago

Hi, thanks for this job. after runing docker run -it --rm -v $PWD:/data --ipc=host --network=host mapbox/robosat:latest-cpu --help it looks like everything is good, but when try to run rs command it says "The order "rs" was not found", any idea why is this happening?? thanks rs

daniel-j-h commented 4 years ago
  1. don't run docker under sudo; add your user to the docker group
  2. read up on docker; if you run docker images, you can't expect their content to be installed on your system. The first command runs the rs tools inside the container, the second command tries to run a system binary called rs which does not exist on your system.
balla-999 commented 4 years ago

@daniel-j-h thanks for your fast reply. runnig docker without sudo says "Docker dont have permmision", after adding the user to the docker group like you told me, now it says "Docker cannot connect to the docker deamon". Captura de pantalla de 2020-01-15 17-53-47 i ran lots of solution i saw online to try to run or restart the docker but no one works, my docker active status still "failed". any idea about what im doing bad? Thank you Captura de pantalla de 2020-01-15 18-03-45 -i also try to add the user to docker group in macOs, and it looks like works, but running extract command says "rs: to many arguments" Captura de Pantalla 2020-01-15 a la(s) 5 44 49 p  m

daniel-j-h commented 4 years ago

Just repeat the docker run command and instead of --help say for example extract.

balla-999 commented 4 years ago

Just repeat the docker run command and instead of --help say for example extract.

(oh yes! it works, thanks. Sorry, im a beginner in this) -I solved my Docker problem by the easy way: just uninstall and install again the docker, now it is working, BUT i have another problem now, runing extract have the error showed in the picture. searching, it looks like a problem with python, but everything looks normal in my system, online similar problems was solved running export PYTHONPATH=.:$PYTHONPATH but it doesnt works for me, any idea? (both MacOs and Ubuntu, show the same error) Captura de pantalla de 2020-01-17 11-23-28

daniel-j-h commented 4 years ago

It's at /data/map.osm.pbf - please read the docs on docker and it's mounting option.

balla-999 commented 4 years ago

hi, im back. running download command it tooks more than 5 hours to complete (yes, i ran it on cpu), but it only create the folders without tiles, and terminal shows all the process failed, also the system monitor shows it was downloading something everytime, any idea about this issue? Captura de pantalla de 2020-01-23 15-15-27 Captura de pantalla de 2020-01-23 15-51-30 I think maybe it was something wrong in the past steps, for example: running extract it doesnt creat one .geojson file but 12 .geojson files, so i ran cover for each one of this then i joined all the .tiles files in only one named buildings.tiles which i used to run download, is this normal? also would like to know if my .tiles files looks like it most to look, and some warnings also make doubt, thank you so much, for any help. Captura de pantalla de 2020-01-23 15-05-24 THIS IS MY BUILDINGS.TILES Captura de pantalla de 2020-01-22 16-43-22 MY .GEOJSON FILES Captura de pantalla de 2020-01-23 20-34-02

daniel-j-h commented 4 years ago

The URL you pass to rs download seems to be a single tif. This will not work; it expects an endpoint to download Slippy Map tiles from.

You can just download the tif manually and then you have to tile it into Slippy Map tiles on a specific zoom level. Read up on it here: https://www.openstreetmap.org/user/daniel-j-h/diary/44321

And check out e.g. gdal2tiles. Note: gdal2tiles generates tiles in TMS format, you'd have to flip the y-coordinate for proper Slippy Map tiles, see https://gist.github.com/tmcw/4954720

balla-999 commented 4 years ago

im following https://www.openstreetmap.org/user/daniel-j-h/diary/44321 but im confuse about where should i take the url from, which i must pass to rs download. what i did was use OpenAerialMap Api in the browser https://api.openaerialmap.org/meta?bbox=38.9410400390625,-7.0545565715284955,39.70458984374999,-5.711646879515092 and copy the uuid, but it shows lots of uuid. today i did it but instead of copy .tif url, i copy .png url (like in the tutorial), and for first time it works, but it generated 233 folders with only 10 files .webp, I guess its because the url i pass only have that 10, where can i get a unique url which have whole the imagery?? thanks again THIS IS THE URL WHICH GAVE ME 10 IMAGES Captura de pantalla de 2020-01-24 12-06-03

daniel-j-h commented 4 years ago

OpenAerialMap creates one Slippy Map endpoint per .TIF file. You need to query many (for multiple .TIFs) and combine their tiles. Or tile the .TIF files on your own (see comments above).

balla-999 commented 4 years ago

Hii, thanks for all your help, finally i have the dataset and config files ready. my problem now is while training: it starts well but after few minutes it just stuck Captura de pantalla de 2020-01-30 10-12-11 When i try to exit (pressing ctrl+c) it doesnt works, so i must reset my computer. any idea about this? my hardware is: Cpu intel core i7, Ram 32Gb, Gpu two GTX 970. Runing Ubuntu 18.04Lts. thnak you

daniel-j-h commented 4 years ago

Check nvidia-smi or nvtop to monitor your gpu, check htop to monitor your cpus, memory, and swap space (are you swapping?), check iotop to monitor I/O.

Otherwise it's hard to tell what's going on in your setup.

balla-999 commented 4 years ago

Hi im back, finally it could train well without other changes, thank you. I ran Tanzania sample with very good results. I saw this project can work for buildings, parking lots and roads, what about water? is it already implemented to extract water?

daniel-j-h commented 4 years ago

You can extend robosat for arbitrary OpenStreetMap features, see

https://github.com/mapbox/robosat#extending

In addition for water I recommend checking out existing ones like the Sentinel scene classification mask.