Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Airborne Object Detection - Starter Kit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vivo_advan
Airborne Object Detection - Starter Kit
Commits
23052f78
Commit
23052f78
authored
3 years ago
by
Shivam Khandelwal
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: override of flights in case of same flight_id
parent
b927a1c7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/dataset.py
+4
-1
4 additions, 1 deletion
core/dataset.py
core/frame.py
+7
-3
7 additions, 3 deletions
core/frame.py
with
11 additions
and
4 deletions
core/dataset.py
+
4
−
1
View file @
23052f78
...
...
@@ -23,10 +23,13 @@ class Dataset:
self
.
metadata
=
gt
[
"
metadata
"
]
for
flight_id
in
gt
[
"
samples
"
].
keys
():
flight_id_with_prefix
=
flight_id
if
self
.
prefix
:
flight_id_with_prefix
=
self
.
prefix
+
flight_id
if
self
.
partial
and
flight_id
not
in
self
.
valid_encounter
:
logger
.
info
(
"
Skipping flight, not present in valid encounters: %s
"
%
flight_id
)
continue
self
.
flights
[
flight_id
]
=
Flight
(
flight_id
,
gt
[
"
samples
"
][
flight_id
],
self
.
file_handler
,
self
.
valid_encounter
.
get
(
flight_id
),
prefix
=
self
.
prefix
)
self
.
flights
[
flight_id
_with_prefix
]
=
Flight
(
flight_id
_with_prefix
,
gt
[
"
samples
"
][
flight_id
],
self
.
file_handler
,
self
.
valid_encounter
.
get
(
flight_id
),
prefix
=
self
.
prefix
)
def
load_ve
(
self
):
if
self
.
partial
:
...
...
This diff is collapsed.
Click to expand it.
core/frame.py
+
7
−
3
View file @
23052f78
...
...
@@ -51,12 +51,16 @@ class Frame:
return
len
(
self
.
detected_objects
)
def
image_path
(
self
):
flight_id
=
self
.
flight
.
id
if
self
.
flight
.
prefix
:
return
os
.
path
.
join
(
'
Images
'
,
self
.
flight
.
prefix
+
self
.
flight
.
id
,
(
str
(
self
.
timestamp
)
+
str
(
self
.
flight
.
id
)
+
'
.png
'
))
return
os
.
path
.
join
(
'
Images
'
,
self
.
flight
.
id
,
(
str
(
self
.
timestamp
)
+
str
(
self
.
flight
.
id
)
+
'
.png
'
))
flight_id
=
self
.
flight
.
id
.
split
(
self
.
flight
.
prefix
)[
1
]
return
os
.
path
.
join
(
'
Images
'
,
self
.
flight
.
id
,
(
str
(
self
.
timestamp
)
+
flight
_
id
+
'
.png
'
))
def
image_s3_path
(
self
):
return
os
.
path
.
join
(
'
Images
'
,
self
.
flight
.
id
,
(
str
(
self
.
timestamp
)
+
str
(
self
.
flight
.
id
)
+
'
.png
'
))
flight_id
=
self
.
flight
.
id
if
self
.
flight
.
prefix
:
flight_id
=
self
.
flight
.
id
.
split
(
self
.
flight
.
prefix
)[
1
]
return
os
.
path
.
join
(
'
Images
'
,
flight_id
,
(
str
(
self
.
timestamp
)
+
flight_id
+
'
.png
'
))
def
image
(
self
,
type
=
'
pil
'
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment