Comments (8)
Here is the graph: https://github.com/mapbox/robosat/blob/b593a6b12957649767aaeb2dc60951e453a088ca/robosat/graph/core.py
It's a simple hand-rolled undirected graph, with depth-first search and connected component clustering capabilities.
Per vertex s
it is storing all outgoing edges to vertices t_n
in a set. And because we want an undirected graph, we do the same for every vertex t
for all outgoing edges to vertices s_n
. The graph semantic is super simple to implement with a defaultdict(set)
but there's quite some overhead in it.
If your benchmark results show the graph construction or traversal to take the majority of time spent here, you have two options:
- manually look into more efficient graph representations, e.g. look into the compressed sparse row representation (CSR), or
- just integrate something pre-made like networkx
If you are actively using this, I highly recommend you looking at the issues and potentially first upgrading dependencies.
I no longer actively maintain this and I am no longer with Mapbox.
from robosat.
Hey @Venka97 - what came out of this? Have you looked into it?
from robosat.
Hey @daniel-j-h, I was occupied this week with some other work. I will do it as soon as I get free and post an update.
from robosat.
Hey, @daniel-j-h , so I tried integrating undirected graph using something pre-made. I tried out both networkx and graph-tool and there wasn't much difference in graph construction. If anything, networkx is slightly slower than your implementation.
I am yet to look into more efficient graph representations.
from robosat.
@daniel-j-h, I think have managed to solve the issue. The graph building was taking a lot of time but it didn't have anything to do with it.
From pyproj documentation, given that we use same transformations, i.e. epsg:4346 -> equal area and back, we can pre-initialize it rather than passing the CRS as args in buffer and unbuffer methods.
Doing this gave me a massive improvement, for a sample geojson before it took me ~23 minutes for graph building loop. After this, it took ~30 seconds.
from robosat.
from robosat.
Sure, I'll do that!
from robosat.
Opened #209
from robosat.
Related Issues (20)
- image size HOT 1
- rs download not working in case of tanzania images HOT 4
- rs train results
- converting segmented masks into geojson files
- Available pre-trained models HOT 2
- Need an install instruction in a Python IDE HOT 4
- installation Error: No such file or directory: '/data/model.toml' HOT 10
- Data preparation
- Multipolygons cause "UnboundLocalError: local variable 'x' referenced before assignment" in rs cover HOT 1
- Don't see any prediction with rs serve HOT 5
- poor prediction in satellite images HOT 4
- Error while training HOT 1
- Meaning of the QoD Metric HOT 2
- Bringin own data HOT 14
- RuntimeError: unexpected EOF, expected 2051578 more bytes. The file might be corrupted. HOT 1
- Augmented data is stopping weight calculation and training. HOT 1
- [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/mapbox/mapbox-maps-android?pullRequest=1777) <br/>Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/mapbox/mapbox-maps-android?pullRequest=1777) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/mapbox/mapbox-maps-android?pullRequest=1777) it.</sub> HOT 1
- Extracting segmentation masks from bbox coordinates HOT 2
- Division by zero when training with small datasets caused by incomplete batch dropping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robosat.