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

[Ai-1477]-darwin-v2-export-fix #721

Merged
merged 76 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f963e36
fixing test
ChristofferEdlund Oct 16, 2023
08fc262
added polygon and complex polygon tests with bounding boxes
ChristofferEdlund Oct 16, 2023
db3fbde
extended convertion tests
ChristofferEdlund Oct 16, 2023
5d98462
formatter
ChristofferEdlund Oct 17, 2023
69f33f0
updated test to reflect adding of bounding box
ChristofferEdlund Nov 14, 2023
b3c82e0
updated tests to check for new format
ChristofferEdlund Nov 14, 2023
594844a
added additional test for box and tag
ChristofferEdlund Nov 14, 2023
5ff60ae
removed prints
ChristofferEdlund Nov 14, 2023
8ded8db
black reformat
ChristofferEdlund Nov 14, 2023
f45ce38
black format
ChristofferEdlund Nov 14, 2023
828653b
removed an import
ChristofferEdlund Nov 14, 2023
054e4bf
added schema ref
ChristofferEdlund Nov 14, 2023
ef5f7b8
reformated utils
ChristofferEdlund Nov 14, 2023
cfce1bc
added support RemoteDatasetV1 parsing and updated tests
ChristofferEdlund Nov 14, 2023
4de5d9e
black fomrat
ChristofferEdlund Nov 14, 2023
37fb419
additional black magic
ChristofferEdlund Nov 14, 2023
15572bc
merge from master
ChristofferEdlund Nov 15, 2023
a74b006
merge from master
ChristofferEdlund Nov 15, 2023
0914e60
fixed conflic
ChristofferEdlund Nov 15, 2023
3d62044
minor fixes
ChristofferEdlund Nov 15, 2023
ab60ec6
removed ignore of empty files
ChristofferEdlund Nov 15, 2023
b178a6c
updated tests for new (old) behaviour
ChristofferEdlund Nov 15, 2023
c21ab07
added test case
ChristofferEdlund Nov 15, 2023
2991bc8
updated test
ChristofferEdlund Nov 16, 2023
f712ce7
updated code to work with bounding boxes and polygon, also added togg…
ChristofferEdlund Nov 17, 2023
b090f61
black
ChristofferEdlund Nov 17, 2023
2af57b4
adjusting paths to pass tests
ChristofferEdlund Nov 17, 2023
2d9f9d2
black
ChristofferEdlund Nov 17, 2023
20ae224
handling polyg and bbox bounding box anno
ChristofferEdlund Nov 17, 2023
aa65a29
[PY-401][external] Restore Meta Item & ItemQuery functions (#718)
JBWilkie Nov 16, 2023
ab4627a
[PY-402][external] Archive Meta Item & ItemQuery functions (#719)
JBWilkie Nov 16, 2023
96227e5
[PY-403][external] Set Priority Meta Item & ItemQuery functions (#720)
JBWilkie Nov 16, 2023
859de11
automatic ruff --fix changes (#723)
Nathanjp91 Nov 16, 2023
ce7f4d3
minor updates to tests
ChristofferEdlund Nov 17, 2023
c66ceb8
added make polygon tests for darwin_v2 format
ChristofferEdlund Nov 17, 2023
691eed7
updating tests to accomidate darwin V2 format
ChristofferEdlund Nov 17, 2023
7106dc5
black
ChristofferEdlund Nov 17, 2023
179da54
added nifty V2 test
ChristofferEdlund Nov 17, 2023
4c30f17
Merge remote-tracking branch 'origin' into ai-1410-darwin-v2-export-fix
ChristofferEdlund Nov 17, 2023
d0b33e5
black
ChristofferEdlund Nov 17, 2023
09b105e
refactor
ChristofferEdlund Nov 20, 2023
5b1ddc4
ruff --fix
ChristofferEdlund Nov 20, 2023
3a4785a
removed try catch in stacked targets
ChristofferEdlund Nov 20, 2023
ec61777
removed print
ChristofferEdlund Nov 20, 2023
36ca721
Reverted specific files to state in commit 09b105eed12f8d0a3d21beaf62…
ChristofferEdlund Nov 20, 2023
6130abe
converting complex and regular polygon to import format
ChristofferEdlund Nov 21, 2023
9bf55b9
added a potential e2e import fix
ChristofferEdlund Nov 21, 2023
6689d9f
removed debug prints
ChristofferEdlund Nov 21, 2023
d36f7d2
latest sync
ChristofferEdlund Nov 22, 2023
d0f7ca8
updated code to pass e2e tests
ChristofferEdlund Nov 22, 2023
4371111
black and ruff --fix all
ChristofferEdlund Nov 22, 2023
da8bf83
updated formatting
ChristofferEdlund Nov 22, 2023
3f4b740
minor changes to complex polygon
ChristofferEdlund Nov 22, 2023
28024bc
minor fix
ChristofferEdlund Nov 22, 2023
31a8314
black
ChristofferEdlund Nov 22, 2023
12239c8
minor updates based on comments
ChristofferEdlund Nov 22, 2023
c942a81
added PolygonPath and PolygonPaths definitions
ChristofferEdlund Nov 27, 2023
d75dcdd
merge
ChristofferEdlund Nov 27, 2023
3bac7e1
extended convertion tests
ChristofferEdlund Oct 16, 2023
05ed7c8
local changes
ChristofferEdlund Nov 27, 2023
41dd767
reverted changes to internal darwin format, convertion to v2 only don…
ChristofferEdlund Nov 27, 2023
f41a324
black
ChristofferEdlund Nov 27, 2023
dc2ac42
ruff and black
ChristofferEdlund Nov 27, 2023
a50f84e
merged from master
ChristofferEdlund Nov 27, 2023
7175c12
removed settings.json changes
ChristofferEdlund Nov 27, 2023
f06759c
reverting to non-v2 data.zip
ChristofferEdlund Nov 27, 2023
395b2c1
merged darwin_v1_test changes from origin master
ChristofferEdlund Nov 27, 2023
0153c78
changed json stream to normal json
ChristofferEdlund Nov 27, 2023
09b00d2
Fix `RecursionError` in `Item` class (#732)
saurbhc Nov 28, 2023
72bc6fc
commiting changes
ChristofferEdlund Nov 28, 2023
89a8a24
Merge remote-tracking branch 'origin' into ai-1410-darwin-v2-export-fix
ChristofferEdlund Nov 28, 2023
0e095c4
fixed json-stream error when checking for non-empty lists
ChristofferEdlund Nov 28, 2023
28c168c
remove unused import
ChristofferEdlund Nov 28, 2023
e991394
fixed video to image convertion bug when folders are used
ChristofferEdlund Nov 30, 2023
ec92bda
removed debug print
ChristofferEdlund Nov 30, 2023
ce7788c
removed debug print
ChristofferEdlund Nov 30, 2023
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
Prev Previous commit
Next Next commit
removed try catch in stacked targets
ChristofferEdlund committed Nov 20, 2023
commit 3a4785adc0a17096dd889e2e67a13424a3139e14
16 changes: 6 additions & 10 deletions darwin/torch/dataset.py
Original file line number Diff line number Diff line change
@@ -639,16 +639,12 @@ def get_target(self, index: int) -> Dict[str, Tensor]:
targets.append(ann)
# following https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html

try:
stacked_targets = {
"boxes": torch.stack([v["bbox"] for v in targets]),
"area": torch.stack([v["area"] for v in targets]),
"labels": torch.stack([v["label"] for v in targets]),
"image_id": torch.tensor([index]),
}
except Exception as e:
print(target)
raise e
stacked_targets = {
"boxes": torch.stack([v["bbox"] for v in targets]),
"area": torch.stack([v["area"] for v in targets]),
"labels": torch.stack([v["label"] for v in targets]),
"image_id": torch.tensor([index]),
}

stacked_targets["iscrowd"] = torch.zeros_like(stacked_targets["labels"])