Comments (5)
@saurabheights looks good ill accept a pr
from imantics.
@saurabheights thanks a lot, that's great!
from imantics.
The method def index(self, image)
looks for annotation in dataset annotations and tries to update its id until annotation_index has no annotation with same id. Problem is that this has been implemented in recursive manner. Since I never set annotation id as I did for images in #24 , as more annotations gets indexed, the recursive update of id keeps going deeper and deeper.
from imantics.
I've now as well hit this same error, which happens when the underlying dataset exceeds a certain size. This is indeed a critical issue, since without fixing the dataset indexing the library is unusable right now.
from imantics.
@amplejoe This below is quick fix. Hope it helps. Just incrementing it should be fine. I can make a PR, if @jsbroks is fine with it.
The quick fix basically sets id to max index_id +1. My first change was to just increment till no such id is found, but it gets pretty slow.
def index(self, image):
annotation_index = image.annotations
category_index = image.categories
if self.id < 1:
self.id = len(annotation_index) + 1
# Increment index until not found
if annotation_index.get(self.id):
self.id = max(annotation_index.keys()) + 1
annotation_index[self.id] = self
# Category indexing should be case insenstive
category_name = self.category.name.lower()
# Check if category exists
category_found = category_index.get(category_name)
if category_found:
# Update category
self.category = category_found
else:
# Index category
category_index[category_name] = self.category
from imantics.
Related Issues (20)
- Handling occlusions
- Is it possible to smooth the mask polygons? HOT 2
- ETA for the v0.1.13 release? HOT 1
- Is it possible that imantics is missing the mask outermost pixels? HOT 2
- dataset.add taking to long if number of files are in thousands
- dataset.add() method do not work as expect
- converting binary masks to coco format
- bug: polygon notation from mask
- Can imantics work with DeepLabv3 to get polygon coordinates for semantic segmentation?
- Fix typo in flickr_url
- Bug when exporting category to coco format
- Extra metadata when exporting image to coco format
- Bug in assert when creating annotations
- Is it possible to delete entries below threshold in class imantics annotation polygons?
- Add type hints and add py.typed marker
- Convert Single mask image to polygon
- segmentation is removed in coco export when a single polygon is supplied
- COCO export is very memory inefficient.
- imantics 0.1.12 is bugged
- Multiclass mask
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 imantics.