{"action":"created","issue":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/284","repository_url":"https://api.github.com/repos/fizyr/keras-retinanet","labels_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/284/comments","events_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/284/events","html_url":"https://github.com/fizyr/keras-retinanet/issues/284","id":296324882,"number":284,"title":"Plugin based mechanism for Dataset definitions","user":{"login":"awilliamson","id":621477,"avatar_url":"https://avatars3.githubusercontent.com/u/621477?v=4","gravatar_id":"","url":"https://api.github.com/users/awilliamson","html_url":"https://github.com/awilliamson","followers_url":"https://api.github.com/users/awilliamson/followers","following_url":"https://api.github.com/users/awilliamson/following{/other_user}","gists_url":"https://api.github.com/users/awilliamson/gists{/gist_id}","starred_url":"https://api.github.com/users/awilliamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilliamson/subscriptions","organizations_url":"https://api.github.com/users/awilliamson/orgs","repos_url":"https://api.github.com/users/awilliamson/repos","events_url":"https://api.github.com/users/awilliamson/events{/privacy}","received_events_url":"https://api.github.com/users/awilliamson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-12T10:23:12Z","updated_at":"2018-02-12T19:18:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The idea would be to encapsulate datasets. All datasets share a common interface, for generators, evaluators, etc. When we create datasets, the same type of code is executed, but leads to an ugly long if chain.\r\nThe common use-case seems to be that people will want to make their own dataset, or to support future object datasets. In these instances modifying every mention within the source code can be tedious and error-prone.\r\nI propose the use of a the plugin pattern. This allows those who so wish to drag a folder in, be self-loaded, self-identified. Then a mechanism ( I want to say strategy ) will select the appropriate plugin if loaded, and invoke whatever method via the interface. E.g `getGenerators`.\r\n\r\nI spoke briefly to @hgaiser about this, and he recommended I make this issue, so that @de-vri-es can have a look.\r\n\r\nI have been working on this as my project requires a confidential dataset, and keeping up with development changes is getting difficult with multiple files needing to be edited. I have made my own Dataset Class, as it is very similar to VOC standard but needed tweaking.\r\n\r\nThere is currently a library for handling a plugin system, which is minimal and written in standard python. I found very little in the way of Python Plugin systems in recent times, all seem to date 4+ years ago."},"comment":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/comments/365031787","html_url":"https://github.com/fizyr/keras-retinanet/issues/284#issuecomment-365031787","issue_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/284","id":365031787,"user":{"login":"de-vri-es","id":786213,"avatar_url":"https://avatars1.githubusercontent.com/u/786213?v=4","gravatar_id":"","url":"https://api.github.com/users/de-vri-es","html_url":"https://github.com/de-vri-es","followers_url":"https://api.github.com/users/de-vri-es/followers","following_url":"https://api.github.com/users/de-vri-es/following{/other_user}","gists_url":"https://api.github.com/users/de-vri-es/gists{/gist_id}","starred_url":"https://api.github.com/users/de-vri-es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/de-vri-es/subscriptions","organizations_url":"https://api.github.com/users/de-vri-es/orgs","repos_url":"https://api.github.com/users/de-vri-es/repos","events_url":"https://api.github.com/users/de-vri-es/events{/privacy}","received_events_url":"https://api.github.com/users/de-vri-es/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T19:18:20Z","updated_at":"2018-02-12T19:18:20Z","author_association":"OWNER","body":"I think this is a great idea. I expect it will significantly clean up the scripts and remove a lot of code duplication between them. I do have a few concerns, but I think those should not be a problem:\r\n\r\n* I don't want to extend the API of generators themselves to support this. In fact, I kinda want to reduce the API (but that is another topic). Instead, this could be implemented as separate objects/functions that produce generators (and it sounds like you were also thinking along these lines).\r\n* The main focus of this repository should be the network itself. I think a system for this is useful, but it should first and foremost be simple and easy to maintain. If it becomes too complex it might make sense to develop it as a separate project that also works with other networks (but this would probably complicate it even further).\r\n* This is a bit personal, but I'm not a fan of overly OOy names like `FooStrategyFactoryObserver` or things like that (I'm exaggerating, but you get the point I think). I prefer passing callable objects (which could be regular functions) as arguments rather than having users derive some base class. To me this has two advantage: it prevents any names like `FooStrategyFactoryObserver`, but it also helps to keep boilerplate code to a minimum when implementing a new dataset. Of course, callable objects aren't always flexible enough so this not a strict rule.\r\n* I'd like to provide early feedback on the API and implementation.\r\n\r\nI prefer github for discussions on code because the threshold is lower for random people to read it and join in. We can discuss on slack in person to get things going though. I'll summarize here from time to time if it feels important."}}
{"actor":{"display_login":"de-vri-es"}}