doccano icon indicating copy to clipboard operation
doccano copied to clipboard

Different user annotate different parts of datasets in the same project?

Open feng-1985 opened this issue 7 years ago • 18 comments

How to solve this?

feng-1985 avatar Jan 16 '19 01:01 feng-1985

I also have a similar question. How to let other users work together for the data annotation within a same project?

eshijia avatar Jan 16 '19 02:01 eshijia

Right now, different users cannot work in the same project. In such a case, you can share your account with others.

BrambleXu avatar Jan 16 '19 04:01 BrambleXu

doccano supports multi-user annotation. Right now, they can annotate same parts of dataset but they cannot annotate different parts of dataset.

If you want to do it, please split your dataset, create multi projects and assign users to each project.

Hironsan avatar Jan 16 '19 05:01 Hironsan

Is this feature necessary? If the users think so, please vote up.

According to the number, I will consider the implementation.

Hironsan avatar Jan 16 '19 05:01 Hironsan

how to vote up?

feng-1985 avatar Jan 16 '19 07:01 feng-1985

Click 👍 button.

Hironsan avatar Jan 16 '19 08:01 Hironsan

@Hironsan This feature would be super useful for one of my upcoming projects. If you wish, I could help with implementation.

c-w avatar Jan 25 '19 05:01 c-w

@c-w Thanks for your proposal. I'm sure your help is really helpful.

Hironsan avatar Jan 25 '19 06:01 Hironsan

@Hironsan Could you share any thoughts you have on design or architecture for the feature as a starting point?

c-w avatar Jan 25 '19 14:01 c-w

Ideally it would be nice to have N users in the system, configure it such that each sample needed atleast K judgements and then allocate it to the users on a first-come first basis till that K limit is hit.

We've had to do this in our current (much less polished) system because if users stopped tagging then pre-allocated samples would sit idle.

bsatts avatar Feb 04 '19 22:02 bsatts

Ideally it would be nice to have N users in the system, configure it such that each sample needed atleast K judgements and then allocate it to the users on a first-come first basis till that K limit is hit.

We've had to do this in our current (much less polished) system because if users stopped tagging then pre-allocated samples would sit idle.

How do you import N users account using doccano? Thanks in advance.

GitOffice avatar Mar 09 '19 00:03 GitOffice

@bsatts The behavior you described is probably the best, but I feel it may require a lot of changes to make real time allocation works.

How about a lesser version like this:

  • documents are pre allocated and users only see theirs documents
  • admin have an interface to manage and reallocate documents per user with function like transfer from one user to another, redistribute everything

What do you think?

LamDang avatar Apr 11 '19 05:04 LamDang

Yeah that would be pretty reasonable.

bsatts avatar Apr 11 '19 17:04 bsatts

A simple solution is dynamic filtering. It is not perfect but it can filter documents by the number of annotated users. We can specify it by k. The endpoint is like http://127.0.0.1:8000/v1/projects/1/docs?k=3.

from django_filters.rest_framework import FilterSet, NumberFilter
from django.db.models import Count
from .models import Document


class DocumentFilter(FilterSet):

    def get_k(self, queryset, name, value):
        docs = queryset.annotate(num=Count('seq_annotations__user', distinct=True))
        return docs.filter(num__lt=value)

    k = NumberFilter(method='get_k')

    class Meta:
        model = Document

Once we set k in a project, we can use it when fetching documents in an annotation page. Annotators don't have to care about k. All things are performed in the background.

From a viewpoint of implementation, I think it does not require a lot of changes: add DocumentFilter's condition, add a column for k to Project model and change frontend(search method in annotation page).

Hironsan avatar Apr 25 '19 09:04 Hironsan

A simple solution is dynamic filtering. It is not perfect but it can filter documents by the number of annotated users. We can specify it by k. The endpoint is like http://127.0.0.1:8000/v1/projects/1/docs?k=3.

from django_filters.rest_framework import FilterSet, NumberFilter
from django.db.models import Count
from .models import Document


class DocumentFilter(FilterSet):

    def get_k(self, queryset, name, value):
        docs = queryset.annotate(num=Count('seq_annotations__user', distinct=True))
        return docs.filter(num__lt=value)

    k = NumberFilter(method='get_k')

    class Meta:
        model = Document

Once we set k in a project, we can use it when fetching documents in an annotation page. Annotators don't have to care about k. All things are performed in the background.

From a viewpoint of implementation, I think it does not require a lot of changes: add DocumentFilter's condition, add a column for k to Project model and change frontend(search method in annotation page).

Some documents will get annotated for more than k times, since there is no synchronization in the UI. Users click next, the data in this page remains the same as the first time this pages fetch from the server. So, the next document might be annotated by other users too.

hankcs avatar Jul 01 '19 21:07 hankcs

Is there any way to share the same set of labels across different projects? This is related to the current issues (#86) because to allow different users to annotate different parts of the dataset I have used a workaround, that is, to create several projects with subsets of the original dataset. However, creating the same labels for all of them is quite annoying.

gabrer avatar Aug 14 '19 16:08 gabrer

Now doccano can share the data between annotators.

icoxfog417 avatar Sep 03 '19 14:09 icoxfog417

I'm sorry but is the original question answered? I'm trying to do what OP asked and I don't see how. I have many annotators and they should all be labeling in one project simultaneously with K=1, one sample only needs to be labeled by one annotator. How do I do this?

Creating 20 projects for 20 annotators, assigning each annotator to a project, splitting the data into 20 splits and maintaining and setting up projects is not sustainable.

lucala avatar Oct 27 '21 11:10 lucala