Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC'24] Consensus annotation #8434

Open
wants to merge 350 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
350 commits
Select commit Hold shift + click to select a range
f5cf75a
set the default of `quorum` to floor half of `consensus jobs`
Viditagarwal7479 Jul 9, 2024
ea1f3cd
mentioned the type of task object in a function
Viditagarwal7479 Jul 9, 2024
283578f
fixed SaasError of rule order `@use` and `@import`
Viditagarwal7479 Jul 9, 2024
bf8fa7d
improved english on UI
Viditagarwal7479 Jul 9, 2024
2da336f
removed `parent` param from conflict which isn't presnt in `Consensus…
Viditagarwal7479 Jul 12, 2024
df460ce
removed consensus config block and moved `consensus_job_per_normal_jo…
Viditagarwal7479 Jul 12, 2024
b5b6e7f
moved `consensus based annotation` tag into task description
Viditagarwal7479 Jul 12, 2024
6f68b83
fixed the formatting of description HTML
Viditagarwal7479 Jul 12, 2024
fc5201b
removed consensus config block and moved `consensus_job_per_normal_jo…
Viditagarwal7479 Jul 12, 2024
dc12a1f
changed reference to `data.consensus` instead of `data.advanced`
Viditagarwal7479 Jul 12, 2024
a5512e7
added default value of `consensus jobs per normal job` in task creati…
Viditagarwal7479 Jul 12, 2024
a81f057
Merge branch 'consensus-job' of https://github.com/Viditagarwal7479/c…
Viditagarwal7479 Jul 12, 2024
2a07da7
while merging only consider `normal job` if it's in `annotation` stage
Viditagarwal7479 Jul 13, 2024
d8955f2
after merging annotation change normal job `state` to `in_progress` a…
Viditagarwal7479 Jul 13, 2024
32190e2
removed notifcation when saving consensus settings and added a loadin…
Viditagarwal7479 Jul 13, 2024
b9a8b19
added confirmation box when reseting consensus settings
Viditagarwal7479 Jul 13, 2024
10e1053
when consensus jobs are merged the parent job goes in `NEW` state
Viditagarwal7479 Jul 18, 2024
e467eb3
gave everyone assigned to that Task permission to view the Consensus …
Viditagarwal7479 Jul 18, 2024
8508e2e
changed the term `normal job` to `regular job`
Viditagarwal7479 Jul 18, 2024
c24a82d
shifted the consensus based annotation tag below the details of task
Viditagarwal7479 Jul 18, 2024
fe3f524
changed the term `normal job` to `regular job`
Viditagarwal7479 Jul 18, 2024
d53b3ae
showing all kinds of job on jobs page
Viditagarwal7479 Jul 18, 2024
1c5625d
added a filter field for job type in jobs page
Viditagarwal7479 Jul 18, 2024
fd434ae
updated the `schema.yml` with `regular job` instead of `normal job`
Viditagarwal7479 Jul 18, 2024
3b90c8f
Merge branch 'consensus-job' of https://github.com/Viditagarwal7479/c…
Viditagarwal7479 Jul 18, 2024
a5224f1
changed the some leftover usage of `normal job` to `regular job`
Viditagarwal7479 Jul 18, 2024
27297f4
after merging consensus jobs regular job's state is marked as COMPLETE
Viditagarwal7479 Jul 18, 2024
e33f9b2
changed button name for mergeing consensus jobs
Viditagarwal7479 Jul 18, 2024
2a26581
Merge branch 'gsoc/consensus-feature' of https://github.com/opencv/cv…
Viditagarwal7479 Jul 25, 2024
f754bc6
fixed conflict in `engine` migrations
Viditagarwal7479 Jul 25, 2024
9866dbd
removed unwanted commented code
Viditagarwal7479 Jul 25, 2024
df8bd0c
Merge pull request #7974 from Viditagarwal7479/consensus-job
zhiltsov-max Jul 25, 2024
4bf0aeb
Merge branch 'gsoc/consensus-feature' of https://github.com/opencv/cv…
Viditagarwal7479 Jul 26, 2024
033b6a8
added missing `,` in `TaskReadSerializer` fields
Viditagarwal7479 Jul 27, 2024
6d49bf5
added the max. 10 consensus jobs per regular job condition
Viditagarwal7479 Jul 27, 2024
2c906bb
added tests related to setting consensus jobs per regular job
Viditagarwal7479 Jul 27, 2024
7635f34
fixed OKS implementation
Viditagarwal7479 Jul 28, 2024
a6a9def
Merge branch 'develop' of https://github.com/opencv/cvat into merge_c…
Viditagarwal7479 Jul 28, 2024
1b206a3
added sigma for OKS calculation in consensus settings
Viditagarwal7479 Jul 28, 2024
1e60737
added matching from `quality_reports.py` and merging of skeletons to …
Viditagarwal7479 Jul 28, 2024
6c24859
formatted python code
Viditagarwal7479 Jul 28, 2024
0412835
added consensus jobs and their annotations into backup
Viditagarwal7479 Jul 30, 2024
f5a4880
added `restore_db_per_function` to TestTaskBackups
Viditagarwal7479 Jul 30, 2024
89b86df
fixed `JobSummarySerializer` to include all types of Jobs in `TaskSum…
Viditagarwal7479 Aug 3, 2024
2c2ca6a
fixed a typo in project as peoject
Viditagarwal7479 Aug 5, 2024
9315d67
added consensus score and assignee to consensus report
Viditagarwal7479 Aug 5, 2024
7ede7cb
added separate consensus merge and analytics button
Viditagarwal7479 Aug 5, 2024
cc036a4
fixed that `count` param wasn't considering `consensus jobs` in Task …
Viditagarwal7479 Aug 6, 2024
c186d67
removed unwanted comments
Viditagarwal7479 Aug 6, 2024
93d0758
count param in `tasks.json` for testing updated
Viditagarwal7479 Aug 6, 2024
f7c20a0
added target param while filtering consensus report
Viditagarwal7479 Aug 8, 2024
d922b8f
added target and assignee in consensus reports
Viditagarwal7479 Aug 8, 2024
ca4d4f2
added consensus migrations
Viditagarwal7479 Aug 8, 2024
c240ee7
reformatting and removed unused imports
Viditagarwal7479 Aug 8, 2024
0b428f8
updated implementation of count of jobs in task details
Viditagarwal7479 Aug 8, 2024
26a7157
updated shade of yellow color in quality and consensus color
Viditagarwal7479 Aug 8, 2024
2af30ba
renamed QualityConflictsFilter to ConflictsFilter
Viditagarwal7479 Aug 8, 2024
13e9edb
added interface for Consensus Reports, Settings and Conflict
Viditagarwal7479 Aug 8, 2024
8170c8a
replace `jobName` change with a Tag
Viditagarwal7479 Aug 8, 2024
3eb8ec6
updated `schema.yml`
Viditagarwal7479 Aug 8, 2024
924ad45
added tag to consensus job list in task view
Viditagarwal7479 Aug 8, 2024
91caee6
removed settings reset button
Viditagarwal7479 Aug 8, 2024
a487dd0
confirmation dialog before merging consensus jobs
Viditagarwal7479 Aug 8, 2024
59f2daa
added structure of consensus conflict and report
Viditagarwal7479 Aug 8, 2024
79c2a7b
added consensus analytics page
Viditagarwal7479 Aug 8, 2024
008d14b
removed declaration of unused variable in consensus test case
Viditagarwal7479 Aug 8, 2024
e6c7f58
reformat consensus settings form
Viditagarwal7479 Aug 8, 2024
d9466bf
Merge branch 'gsoc/consensus-feature' into merge_consensus_jobs
Viditagarwal7479 Aug 8, 2024
7c0aefc
added `AssigneeConsensusReport`
Viditagarwal7479 Aug 12, 2024
54e7d97
formatted python files
Viditagarwal7479 Aug 12, 2024
fdfc3cb
added `assignee consensus report` in the react for assignee consensus…
Viditagarwal7479 Aug 12, 2024
de1e7eb
added assignee consnesus report into assignee list
Viditagarwal7479 Aug 12, 2024
06bea50
removed console.log and fixed sort statement in table
Viditagarwal7479 Aug 12, 2024
5e0bc21
removed consensus modal
Viditagarwal7479 Aug 12, 2024
11258ec
added more appropriate type and assert to common `segment_iou`
Viditagarwal7479 Aug 12, 2024
bb7f242
added check of `media` before accessing it's attributes
Viditagarwal7479 Aug 12, 2024
40585f4
added consensus worker information to yml files
Viditagarwal7479 Aug 13, 2024
4228ad2
removed create assignee report endpoint
Viditagarwal7479 Aug 13, 2024
ced9e5c
updated `schema.yml`
Viditagarwal7479 Aug 13, 2024
9d1fd92
added consensus endpoints for test json dump
Viditagarwal7479 Aug 13, 2024
d2a6789
refined the message in confirmation box before merging consnesus jobs
Viditagarwal7479 Aug 14, 2024
01ef325
added information about conflict count at assignee level
Viditagarwal7479 Aug 14, 2024
ca61c51
disabled merge button when merging in progress
Viditagarwal7479 Aug 14, 2024
4642244
Merge branch 'develop' of https://github.com/opencv/cvat into gsoc/co…
Viditagarwal7479 Aug 14, 2024
b45d795
fixed the conflict due to newly added migrations in `engine` app
Viditagarwal7479 Aug 14, 2024
6e8e252
Merge pull request #8305 from Viditagarwal7479/gsoc/consensus-feature
zhiltsov-max Aug 14, 2024
755465e
added `cvat-task-analytics-tabs` to `styles.scss`
Viditagarwal7479 Aug 14, 2024
7f229ad
Replaced Analytics with Consensus Analytics
Viditagarwal7479 Aug 14, 2024
fc5b670
removed consensus tab from old analytics page
Viditagarwal7479 Aug 14, 2024
1acb383
removed the stale action types for consensus modal
Viditagarwal7479 Aug 14, 2024
4532b28
moved consensus analytics page from `/tasks/id/analytics/consensus` t…
Viditagarwal7479 Aug 14, 2024
cd05f0f
converted snake_case to camelCase in typescript code
Viditagarwal7479 Aug 14, 2024
3ea3981
removed `styles.scss` associated with earlier `consensus modal`
Viditagarwal7479 Aug 14, 2024
0bac45b
moved `consensus-settings-form` file into the consensus analytics folder
Viditagarwal7479 Aug 14, 2024
76f2d2c
Merge branch 'gsoc/consensus-feature' of https://github.com/Viditagar…
Viditagarwal7479 Aug 14, 2024
d3c3750
removed reference to deleted `styles.scss`
Viditagarwal7479 Aug 14, 2024
188f9f0
updated path of `ConsensusSettingsForm` while refering in code
Viditagarwal7479 Aug 14, 2024
3ce1295
modified consensus migrations based on changes in engine migrations a…
Viditagarwal7479 Aug 14, 2024
2fb5941
Merge branch 'gsoc/consensus-feature' into merge_consensus_jobs
Viditagarwal7479 Aug 14, 2024
145a9d2
Merge commit 'cc036a46a4c54353bf83763903d367829bbd5dd5' into merge_co…
Viditagarwal7479 Aug 14, 2024
2ac3abc
Merge commit '008d14b8beb2a7a5d3fb619881b806042c69c489' into merge_co…
Viditagarwal7479 Aug 14, 2024
a1b2651
changed endpoint from `/analytics/consensus` to `/consensus`
Viditagarwal7479 Aug 14, 2024
99e78d2
removed consensus report created information from UI when it's not cr…
Viditagarwal7479 Aug 14, 2024
b8566a1
Revert "removed consensus report created information from UI when it'…
Viditagarwal7479 Aug 14, 2024
8fab2b4
removed unwanted notification for consensus job error added useful ea…
Viditagarwal7479 Aug 14, 2024
0654857
removed consensus report created date info from UI when it's not created
Viditagarwal7479 Aug 14, 2024
eebc206
removed unwanted notification for consensus job error added useful ea…
Viditagarwal7479 Aug 14, 2024
30c80bd
removed consensus report created date info from UI when it's not created
Viditagarwal7479 Aug 14, 2024
07b9c0b
Merge remote-tracking branch 'origin/merge_consensus_jobs' into merge…
Viditagarwal7479 Aug 14, 2024
8301ad2
set the `conflict_count` before accessing it even if no errors are there
Viditagarwal7479 Aug 15, 2024
0550298
uncommented consensus worker deployment .conf
Viditagarwal7479 Aug 15, 2024
d59568a
renamed `SettingsFilter` to `QualitySettingsFilter` and `ConsensusSet…
Viditagarwal7479 Aug 15, 2024
b079593
increased weight of `MERGE_CONSENSUS_JOBS` action button from 55 to 60
Viditagarwal7479 Aug 15, 2024
5db8cb0
made `_Serializable` public by removing `_`
Viditagarwal7479 Aug 15, 2024
8539683
optimised the consensus jobs fetching process to make fewer database …
Viditagarwal7479 Aug 15, 2024
ff4140f
added support for no assignee in `AssigneeConsensusReport`
Viditagarwal7479 Aug 15, 2024
8e0d4ac
moved setting the default `quorum` where it's created as function cal…
Viditagarwal7479 Aug 15, 2024
6fda20f
assignee in assignee consensus report wouldn't be none
Viditagarwal7479 Aug 15, 2024
7787fe2
replaced `assigneeID` with `assignee.id`
Viditagarwal7479 Aug 15, 2024
0376d31
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Aug 15, 2024
2a2efe9
made the job type tag into ribbon in jobs page
Viditagarwal7479 Aug 15, 2024
b6e21ff
added case for null assignee in `AssigneeConsensusReport`
Viditagarwal7479 Aug 15, 2024
3f8e171
added function to create `assignee_consensus_report`
Viditagarwal7479 Aug 15, 2024
893091a
moved calc. `task_mean_consensus_score` out from `save_report`
Viditagarwal7479 Aug 15, 2024
1c427ed
reformatted file and removed duplicated code
Viditagarwal7479 Aug 15, 2024
6bce0ac
reformatted files
Viditagarwal7479 Aug 15, 2024
0ceed73
fixed assignee consensus report when consensus score is nan (no annot…
Viditagarwal7479 Aug 16, 2024
2336773
fixed issue in consensus helm `deployment.yml` while copying from qua…
Viditagarwal7479 Aug 17, 2024
9c0a545
removed unused python imports
Viditagarwal7479 Aug 17, 2024
aa3dcda
fixed nan issue in consensus score when a frame has no annotations
Viditagarwal7479 Aug 18, 2024
d0659b6
made mask matching work the same as polygon matching
Viditagarwal7479 Aug 18, 2024
1ae7309
`self.errors` should contain errors specifc to the current passed dat…
Viditagarwal7479 Aug 18, 2024
c48223e
consensus analytics page is only for task
Viditagarwal7479 Aug 18, 2024
11ef270
added `get_ann_dataset_id` function instead of using class private ob…
Viditagarwal7479 Aug 18, 2024
5530bb4
inherited common properties of `LineMatcher` from `quality_reports.py`
Viditagarwal7479 Aug 19, 2024
1dc43e4
removed unsed function definition
Viditagarwal7479 Aug 19, 2024
05bd621
added `self` param to function defined inside class
Viditagarwal7479 Aug 19, 2024
9b67b7f
added type info to function `match_annotations_two_sources`
Viditagarwal7479 Aug 19, 2024
26e9ab6
fixed the `dm.PolyLine` instead of `dm.Skeleton` in `LineMatcher`
Viditagarwal7479 Aug 19, 2024
ddff303
added return type info instead of pass in `match_annotations_two_sour…
Viditagarwal7479 Aug 19, 2024
6bccbbc
made private objects of IntersectMerge publicly accessible
Viditagarwal7479 Aug 19, 2024
c0af3ee
(in attrib) made private objects of IntersectMerge publicly accessible
Viditagarwal7479 Aug 19, 2024
bd86446
reused objects from `DistanceComparator` in `quality_reports.py` in `…
Viditagarwal7479 Aug 19, 2024
8c09dcf
redefined private class objects to be used publicly
Viditagarwal7479 Aug 19, 2024
060e518
fixed the output type of `match_annotations_two_sources`
Viditagarwal7479 Aug 19, 2024
0692c6b
used the reference to `dm.ops.segment_iou` as default
Viditagarwal7479 Aug 19, 2024
ec58672
label can't be None after merging
Viditagarwal7479 Aug 19, 2024
03a3c31
Merge-able "if" statements are combined
Viditagarwal7479 Aug 19, 2024
e4cc879
updated the return type of function updated in previous commit
Viditagarwal7479 Aug 19, 2024
789cb74
used `(len(...) or 1)` instead of `np.isnan`
Viditagarwal7479 Aug 19, 2024
25e247e
instead of storing `parent_job_id` storing `parent_job` for the conse…
Viditagarwal7479 Aug 20, 2024
ecb8367
made earlier pvt members of `IntersectMerge` pvt again
Viditagarwal7479 Aug 20, 2024
bc3a4d5
added fixed implementation of inherited functions
Viditagarwal7479 Aug 20, 2024
fa42b98
`match_annotations_two_sources` only returns matches
Viditagarwal7479 Aug 20, 2024
4767f74
formatted python files
Viditagarwal7479 Aug 20, 2024
373ec86
improved caching of distances
Viditagarwal7479 Aug 20, 2024
4b4847a
removed unused import
Viditagarwal7479 Aug 20, 2024
f92c0a2
corrected related name param while querying for parent job
Viditagarwal7479 Aug 21, 2024
039c076
added serialisation of assignee in consensus report
Viditagarwal7479 Aug 22, 2024
47733ac
updated related name in Jobs to `childern_jobs`
Viditagarwal7479 Aug 23, 2024
9353906
made keys symmetric in distance caching
Viditagarwal7479 Aug 25, 2024
d3f1bab
added `line_thickness` param for LineMatcher
Viditagarwal7479 Aug 25, 2024
a2c7fe7
removed `DistanceComparator` inheritance with `_distance_comparator` …
Viditagarwal7479 Aug 25, 2024
d06d124
added accessing private class objects through separate function
Viditagarwal7479 Aug 25, 2024
e544e79
converted `OKS` to `oks`
Viditagarwal7479 Aug 25, 2024
bc6cd9a
reformatted code
Viditagarwal7479 Aug 25, 2024
2f49390
reformatted code
Viditagarwal7479 Aug 25, 2024
a9eb879
created a function to get quality and consensus conflicts, to reduce …
Viditagarwal7479 Aug 27, 2024
de91e88
replaced `Conf` reference in `IntersectMerge` object with `conf` the …
Viditagarwal7479 Aug 27, 2024
8db1d21
Passing annotations as `dm.DatasetItem` into quality_reports `match_s…
Viditagarwal7479 Aug 27, 2024
f666c57
added `line_thickness` in consensus settings
Viditagarwal7479 Aug 27, 2024
145fd7a
corrected typed annotation in python function
Viditagarwal7479 Aug 27, 2024
3d68358
reused code from quality_report and used the symmetric property of ca…
Viditagarwal7479 Aug 27, 2024
46a5003
moved `rq_id` into query params
Viditagarwal7479 Aug 27, 2024
ba1d875
reused the `issues.tsx` from task-quality in consensus
Viditagarwal7479 Aug 27, 2024
b68f761
added `rq_id` to consensus jobs merging to handle `rq_id` for consens…
Viditagarwal7479 Aug 28, 2024
3b158b0
used the common sorter implementation in `job_list.tsx` in `task-qual…
Viditagarwal7479 Aug 28, 2024
795daad
`if` to `else if`
Viditagarwal7479 Aug 28, 2024
81763b9
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Aug 29, 2024
671829d
Merge branch 'gsoc/consensus-feature' into gsoc/consensus-feature
Viditagarwal7479 Aug 29, 2024
c8b6e28
Merge pull request #8376 from Viditagarwal7479/gsoc/consensus-feature
zhiltsov-max Aug 29, 2024
0ab57db
added `line_thickness` in consensus reports
Viditagarwal7479 Aug 29, 2024
11c9798
added parent job wise merging in task with consensus jobs
Viditagarwal7479 Aug 29, 2024
4a0d988
`task_id` of a job can't be `null` typescript model
Viditagarwal7479 Aug 29, 2024
1965c72
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Aug 29, 2024
e5910e9
corrected paths of imports which changed on merging `develop` with cu…
Viditagarwal7479 Aug 29, 2024
d9f72fd
Merge branch 'gsoc/consensus-feature' of https://github.com/Viditagar…
Viditagarwal7479 Aug 29, 2024
7e00278
Merge branch 'gsoc/consensus-feature' into merge_consensus_jobs
Viditagarwal7479 Aug 29, 2024
15e2501
imporved info of `agreementScoreThreshold` in Consensus Settings page…
Viditagarwal7479 Aug 29, 2024
6c857b9
Merge branch 'merge_consensus_jobs' of https://github.com/Viditagarwa…
Viditagarwal7479 Aug 29, 2024
91a120c
added remembering of collapsed and uncollapsed state of regular job i…
Viditagarwal7479 Aug 31, 2024
b4ac890
corrected job filter in consensus reports api implementation
Viditagarwal7479 Sep 2, 2024
73aa75b
removed Consensus Conflict Type of `WrongGroupError` and `FailedAttrV…
Viditagarwal7479 Sep 2, 2024
1f12625
made class variables to instance variables. Causing issue when multip…
Viditagarwal7479 Sep 2, 2024
3883993
typo of task as task`s`
Viditagarwal7479 Sep 2, 2024
7d1965a
handled `assignee` can be null on assignee view in Consensus Analytics
Viditagarwal7479 Sep 2, 2024
d28826d
removed unwanted `console.log` statements
Viditagarwal7479 Sep 2, 2024
053a7dd
updated migrations based on removed consensus conflict types
Viditagarwal7479 Sep 2, 2024
42fed6b
updated `schema.yml`
Viditagarwal7479 Sep 2, 2024
85311d6
replaced floor division with ceil division
Viditagarwal7479 Sep 3, 2024
eb9c6e4
made public func as private where needed
Viditagarwal7479 Sep 3, 2024
b0a762d
corrected spelling of children
Viditagarwal7479 Sep 3, 2024
32c5c6a
renamed `new_intersect_merge.py` and `merge_consensus_jobs.py`
Viditagarwal7479 Sep 3, 2024
211425e
reformatted python files
Viditagarwal7479 Sep 3, 2024
864791d
added `consensus` as annotation source type
Viditagarwal7479 Sep 3, 2024
4186fe2
made validation on `oks_sigma` less restrictive in consensus settings
Viditagarwal7479 Sep 3, 2024
a107c2c
remvoed unnessecary condition as job type will be among the 3 known t…
Viditagarwal7479 Sep 3, 2024
6ae0ed7
nothing to show in assignee list if assignee is null
Viditagarwal7479 Sep 4, 2024
8f8091f
updated `schema.yml`
Viditagarwal7479 Sep 4, 2024
0f758bb
moved `consensus_report_id` in filter_fields for assignee report
Viditagarwal7479 Sep 4, 2024
488ebbd
fixed merging of `Point` annotations
Viditagarwal7479 Sep 4, 2024
909b08c
fixed mergeing of `PolyLine` annotations
Viditagarwal7479 Sep 7, 2024
50007a2
removed extra `s` from `consensus/assignee_report` endpoint
Viditagarwal7479 Sep 7, 2024
8916612
moved server health check while starting test container in try for sl…
Viditagarwal7479 Sep 7, 2024
38b9691
added endpoints for consensus objects for accessing them in test cases
Viditagarwal7479 Sep 7, 2024
86eeb0e
added more reliable way to get consensus error type
Viditagarwal7479 Sep 8, 2024
da956e5
reformatted python files
Viditagarwal7479 Sep 8, 2024
5e89857
added `parent_id` to Consensus Reports
Viditagarwal7479 Sep 8, 2024
0c17d44
used `parent_id` in ConsensusConflictsViewSet also
Viditagarwal7479 Sep 9, 2024
33e4b9d
updated `schama.yml` with `parent_id`
Viditagarwal7479 Sep 9, 2024
939cb10
Merge pull request #8042 from Viditagarwal7479/merge_consensus_jobs
zhiltsov-max Sep 9, 2024
bff16ba
fixed the return type of `_get_error_type`
Viditagarwal7479 Sep 9, 2024
da1aa0d
renamed conflict rules in consensus to `consensus_conflicts`
Viditagarwal7479 Sep 9, 2024
051992e
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Sep 11, 2024
27117b6
Merge pull request #8436 from Viditagarwal7479/gsoc/consensus-feature
zhiltsov-max Sep 11, 2024
786c135
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Sep 13, 2024
104b2bb
Merge branch 'cvat-ai:gsoc/consensus-feature' into gsoc/consensus-fea…
Viditagarwal7479 Sep 13, 2024
efa9c53
Merge remote-tracking branch 'upstream/gsoc/consensus-feature' into m…
Viditagarwal7479 Sep 13, 2024
8441428
Merge remote-tracking branch 'upstream/develop' into merge_consensus_…
Viditagarwal7479 Sep 13, 2024
1c0c88d
Merge branch 'develop' into gsoc/consensus-feature
Viditagarwal7479 Sep 13, 2024
befeb37
Merge pull request #8443 from Viditagarwal7479/gsoc/consensus-feature
zhiltsov-max Sep 13, 2024
4674adc
reverted unnecessary changes included in this branch
Viditagarwal7479 Sep 16, 2024
c7cbedb
reverted changes in testing assets, as `consensus_testcases` branch y…
Viditagarwal7479 Sep 16, 2024
505318a
`assignee_reports` to camel case
Viditagarwal7479 Sep 15, 2024
9afad1a
return type is JSON not HTML
Viditagarwal7479 Sep 15, 2024
b957929
fixed the create consensus report end point to return RQID instaad of…
Viditagarwal7479 Sep 13, 2024
e6eccf2
made `task_id` param in request body of create consensus report endpo…
Viditagarwal7479 Sep 13, 2024
7551811
fixed import order, 3rd party imports come before internal imports
Viditagarwal7479 Sep 16, 2024
8efe8fa
added missing components earlier in quality analytics
Viditagarwal7479 Sep 19, 2024
966b6e5
fixing minor bugs in rendering consensus jobs
Viditagarwal7479 Sep 19, 2024
f86a394
removed the `aggregate` endpoint in `Task` and `Job` and using the co…
Viditagarwal7479 Sep 19, 2024
af04e2b
Merge branch 'develop' of https://github.com/cvat-ai/cvat into merge_…
Viditagarwal7479 Sep 21, 2024
9b4ca32
Merge commit 'af04e2b2f06a0c18056ae149602fcdd545284ba7' into gsoc/con…
Viditagarwal7479 Sep 29, 2024
dac855f
added consensus to vscode launch.json
Viditagarwal7479 Sep 29, 2024
06995ee
modified analytics page to include the change in size props in `Analy…
Viditagarwal7479 Oct 1, 2024
93c1dcb
Merge branch 'develop' of https://github.com/Viditagarwal7479/cvat in…
Viditagarwal7479 Oct 1, 2024
e2d96af
fixed migration issue when merging `develop` into `gsoc/consensus-fea…
Viditagarwal7479 Oct 1, 2024
24d79a3
updated `schema.yml`
Viditagarwal7479 Oct 1, 2024
8dc3c2c
handled consensus score as `nan` scenario
Viditagarwal7479 Oct 2, 2024
fc212f0
Merge pull request #8500 from Viditagarwal7479/gsoc/consensus-feature
zhiltsov-max Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,28 @@
},
"console": "internalConsole"
},
{
"name": "server: RQ - consensus",
"type": "debugpy",
"request": "launch",
"stopOnEntry": false,
"justMyCode": false,
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/manage.py",
"args": [
"rqworker",
"consensus",
"--worker-class",
"cvat.rqworker.SimpleWorker"
],
"django": true,
"cwd": "${workspaceFolder}",
"env": {
"DJANGO_LOG_SERVER_HOST": "localhost",
"DJANGO_LOG_SERVER_PORT": "8282"
},
"console": "internalConsole"
},
{
"name": "server: migrate",
"type": "debugpy",
Expand Down Expand Up @@ -537,7 +559,8 @@
"server: RQ - scheduler",
"server: RQ - quality reports",
"server: RQ - analytics reports",
"server: RQ - cleaning"
"server: RQ - cleaning",
"server: RQ - consensus",
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Changed

- Quality analytics page will now report job assignees from quality reports
instead of current job assignees
(<https://github.com/cvat-ai/cvat/pull/8123>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect merge

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- Datumaro format now supports skeletons
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect merge

Please, add correct changelog entry, describing what was implemented in this patch

(<https://github.com/cvat-ai/cvat/pull/8165>)
211 changes: 143 additions & 68 deletions cvat-core/src/api-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ import Organization, { Invitation } from './organization';
import Webhook from './webhook';
import { ArgumentError } from './exceptions';
import {
AnalyticsReportFilter, QualityConflictsFilter, QualityReportsFilter,
AnalyticsReportFilter, ConflictsFilter, QualityReportsFilter,
QualitySettingsFilter, SerializedAsset,
ConsensusReportsFilter,
AssigneeConsensusReportsFilter,
ConsensusSettingsFilter,
} from './server-response-types';
import QualityReport from './quality-report';
import QualityConflict, { ConflictSeverity } from './quality-conflict';
Expand All @@ -44,11 +47,85 @@ import { convertDescriptions, getServerAPISchema } from './server-schema';
import { JobType } from './enums';
import { PaginatedResource } from './core-types';
import CVATCore from '.';
import ConsensusSettings from './consensus-settings';
import ConsensusReport from './consensus-report';
import AssigneeConsensusReport from './assignee-consensus-report';
import ConsensusConflict from './consensus-conflict';

function implementationMixin(func: Function, implementation: Function): void {
Object.assign(func, { implementation });
}

type ConflictType = ConsensusConflict | QualityConflict;

function mergeConflicts<T extends ConflictType>(conflicts: T[]): T[] {
const frames = Array.from(new Set(conflicts.map((conflict) => conflict.frame)))
.sort((a, b) => a - b);

const mergedConflicts: T[] = [];

for (const frame of frames) {
const frameConflicts = conflicts.filter((conflict) => conflict.frame === frame);
const conflictsByObject: Record<string, T[]> = {};

frameConflicts.forEach((qualityConflict: T) => {
const { type, serverID } = qualityConflict.annotationConflicts[0];
Comment on lines +71 to +72
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to remove comments that was left in original function?

If not, please return them

const firstObjID = `${type}_${serverID}`;
conflictsByObject[firstObjID] = conflictsByObject[firstObjID] || [];
conflictsByObject[firstObjID].push(qualityConflict);
});

for (const objectConflicts of Object.values(conflictsByObject)) {
if (objectConflicts.length === 1) {
mergedConflicts.push(objectConflicts[0]);
} else {
const [firstConflict] = objectConflicts;
let mainObjectConflict: T;

if (firstConflict instanceof QualityConflict) {
mainObjectConflict = objectConflicts.find(
(conflict) => (conflict as QualityConflict).severity === ConflictSeverity.ERROR,
) || firstConflict;
} else {
mainObjectConflict = firstConflict;
}
const descriptionList: string[] = [mainObjectConflict.description];

for (const objectConflict of objectConflicts) {
if (objectConflict !== mainObjectConflict) {
descriptionList.push(objectConflict.description);

for (const annotationConflict of objectConflict.annotationConflicts) {
if (!mainObjectConflict.annotationConflicts.find((_annotationConflict) => (
_annotationConflict.serverID === annotationConflict.serverID &&
_annotationConflict.type === annotationConflict.type))
) {
mainObjectConflict.annotationConflicts.push(annotationConflict);
}
}
}
}

const description = descriptionList.join(', ');
const visibleConflict = new Proxy(mainObjectConflict, {
get(target, prop) {
if (prop === 'description') {
return description;
}

const val = Reflect.get(target, prop);
return typeof val === 'function' ? (...args: any[]) => val.apply(target, args) : val;
},
});

mergedConflicts.push(visibleConflict);
}
}
}

return mergedConflicts;
}

export default function implementAPI(cvat: CVATCore): CVATCore {
implementationMixin(cvat.plugins.list, PluginRegistry.list);
implementationMixin(cvat.plugins.register, PluginRegistry.register.bind(cvat));
Expand Down Expand Up @@ -434,7 +511,7 @@ export default function implementAPI(cvat: CVATCore): CVATCore {
);
return reports;
});
implementationMixin(cvat.analytics.quality.conflicts, async (filter: QualityConflictsFilter) => {
implementationMixin(cvat.analytics.quality.conflicts, async (filter: ConflictsFilter) => {
checkFilter(filter, {
reportID: isInteger,
});
Expand All @@ -443,72 +520,7 @@ export default function implementAPI(cvat: CVATCore): CVATCore {

const conflictsData = await serverProxy.analytics.quality.conflicts(params);
const conflicts = conflictsData.map((conflict) => new QualityConflict({ ...conflict }));
const frames = Array.from(new Set(conflicts.map((conflict) => conflict.frame)))
.sort((a, b) => a - b);

// each QualityConflict may have several AnnotationConflicts bound
// at the same time, many quality conflicts may refer
// to the same labeled object (e.g. mismatch label, low overlap)
// the code below unites quality conflicts bound to the same object into one QualityConflict object
const mergedConflicts: QualityConflict[] = [];

for (const frame of frames) {
const frameConflicts = conflicts.filter((conflict) => conflict.frame === frame);
const conflictsByObject: Record<string, QualityConflict[]> = {};

frameConflicts.forEach((qualityConflict: QualityConflict) => {
const { type, serverID } = qualityConflict.annotationConflicts[0];
const firstObjID = `${type}_${serverID}`;
conflictsByObject[firstObjID] = conflictsByObject[firstObjID] || [];
conflictsByObject[firstObjID].push(qualityConflict);
});

for (const objectConflicts of Object.values(conflictsByObject)) {
if (objectConflicts.length === 1) {
// only one quality conflict refers to the object on current frame
mergedConflicts.push(objectConflicts[0]);
} else {
const mainObjectConflict = objectConflicts
.find((conflict) => conflict.severity === ConflictSeverity.ERROR) || objectConflicts[0];
const descriptionList: string[] = [mainObjectConflict.description];

for (const objectConflict of objectConflicts) {
if (objectConflict !== mainObjectConflict) {
descriptionList.push(objectConflict.description);

for (const annotationConflict of objectConflict.annotationConflicts) {
if (!mainObjectConflict.annotationConflicts.find((_annotationConflict) => (
_annotationConflict.serverID === annotationConflict.serverID &&
_annotationConflict.type === annotationConflict.type))
) {
mainObjectConflict.annotationConflicts.push(annotationConflict);
}
}
}
}

// decorate the original conflict to avoid changing it
const description = descriptionList.join(', ');
const visibleConflict = new Proxy(mainObjectConflict, {
get(target, prop) {
if (prop === 'description') {
return description;
}

// By default, it looks like Reflect.get(target, prop, receiver)
// which has a different value of `this`. It doesn't allow to
// work with methods / properties that use private members.
const val = Reflect.get(target, prop);
return typeof val === 'function' ? (...args: any[]) => val.apply(target, args) : val;
},
});

mergedConflicts.push(visibleConflict);
}
}
}

return mergedConflicts;
return mergeConflicts(conflicts);
});
implementationMixin(cvat.analytics.quality.settings.get, async (filter: QualitySettingsFilter) => {
checkFilter(filter, {
Expand All @@ -523,6 +535,58 @@ export default function implementAPI(cvat: CVATCore): CVATCore {

return new QualitySettings({ ...settings, descriptions });
});
implementationMixin(cvat.consensus.reports, async (filter: ConsensusReportsFilter) => {
checkFilter(filter, {
page: isInteger,
pageSize: isPageSize,
projectID: isInteger,
taskID: isInteger,
jobID: isInteger,
filter: isString,
search: isString,
target: isString,
sort: isString,
});

const params = fieldsToSnakeCase({ ...filter, sort: '-created_date' });

const reportsData = await serverProxy.consensus.reports(params);
const reports = Object.assign(
reportsData.map((report) => new ConsensusReport({ ...report })),
{ count: reportsData.count },
);
return reports;
});
implementationMixin(cvat.consensus.assigneeReports, async (filter: AssigneeConsensusReportsFilter) => {
checkFilter(filter, {
page: isInteger,
pageSize: isPageSize,
taskID: isInteger,
filter: isString,
consensusReportID: isInteger,
search: isString,
sort: isString,
});

const params = fieldsToSnakeCase({ ...filter, sort: '-id' });

const reportsData = await serverProxy.consensus.assignee_reports(params);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use camelCase naming style on client. assignee_reports -> assigneeReports

const reports = Object.assign(
reportsData.map((report) => new AssigneeConsensusReport({ ...report })),
{ count: reportsData.count },
);
return reports;
});
implementationMixin(cvat.consensus.settings.get, async (filter: ConsensusSettingsFilter) => {
checkFilter(filter, {
taskID: isInteger,
});

const params = fieldsToSnakeCase(filter);

const settings = await serverProxy.consensus.settings.get(params);
return new ConsensusSettings({ ...settings });
});
implementationMixin(cvat.analytics.performance.reports, async (filter: AnalyticsReportFilter) => {
checkFilter(filter, {
jobID: isInteger,
Expand All @@ -538,6 +602,17 @@ export default function implementAPI(cvat: CVATCore): CVATCore {
const reportData = await serverProxy.analytics.performance.reports(params);
return new AnalyticsReport(reportData);
});
implementationMixin(cvat.consensus.conflicts, async (filter: ConflictsFilter) => {
checkFilter(filter, {
reportID: isInteger,
});

const params = fieldsToSnakeCase(filter);

const conflictsData = await serverProxy.consensus.conflicts(params);
const conflicts = conflictsData.map((conflict) => new ConsensusConflict({ ...conflict }));
return mergeConflicts(conflicts);
});
implementationMixin(cvat.analytics.performance.calculate, async (
body: Parameters<CVATCore['analytics']['performance']['calculate']>[0],
onUpdate: Parameters<CVATCore['analytics']['performance']['calculate']>[1],
Expand Down
21 changes: 21 additions & 0 deletions cvat-core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,26 @@ function build(): CVATCore {
return result;
},
},
consensus: {
async assigneeReports(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.consensus.assigneeReports, filter);
return result;
},
async reports(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.consensus.reports, filter);
return result;
},
async conflicts(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.consensus.conflicts, filter);
return result;
},
settings: {
async get(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.consensus.settings.get, filter);
return result;
},
},
},
classes: {
User,
Project: implementProject(Project),
Expand Down Expand Up @@ -452,6 +472,7 @@ function build(): CVATCore {
cvat.organizations = Object.freeze(cvat.organizations);
cvat.webhooks = Object.freeze(cvat.webhooks);
cvat.analytics = Object.freeze(cvat.analytics);
cvat.consensus = Object.freeze(cvat.consensus);
cvat.classes = Object.freeze(cvat.classes);
cvat.utils = Object.freeze(cvat.utils);

Expand Down
53 changes: 53 additions & 0 deletions cvat-core/src/assignee-consensus-report.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright (C) 2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import { SerializedAssigneeConsensusReportData } from './server-response-types';
import User from './user';

export default class AssigneeConsensusReport {
#id: number;
#taskID: number;
#assignee: User;
#consensusScore: number;
#conflictCount: number;
#consensusReportID: number;

constructor(initialData: SerializedAssigneeConsensusReportData) {
this.#id = initialData.id;
this.#taskID = initialData.task_id;
this.#consensusScore = initialData.consensus_score;
this.#consensusReportID = initialData.consensus_report_id;
this.#conflictCount = initialData.conflict_count;

if (initialData.assignee) {
this.#assignee = new User(initialData.assignee);
} else {
this.#assignee = null;
}
}

get id(): number {
return this.#id;
}

get taskID(): number {
return this.#taskID;
}

get assignee(): User {
return this.#assignee;
}

get consensusScore(): number {
return this.#consensusScore;
}

get conflictCount(): number {
return this.#conflictCount;
}

get consensusReportID(): number {
return this.#consensusReportID;
}
}
Loading
Loading