Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FruitBin
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Guillaume Duret
FruitBin
Commits
0f25276a
Commit
0f25276a
authored
2 years ago
by
Guillaume Duret
Browse files
Options
Downloads
Patches
Plain Diff
add list of occ in meta
parent
4c76a56e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils.py
+21
-8
21 additions, 8 deletions
utils.py
with
21 additions
and
8 deletions
utils.py
+
21
−
8
View file @
0f25276a
...
@@ -40,20 +40,33 @@ def compute_id_good_occ(data_name, count, categories_instance_array_id_to_cat, c
...
@@ -40,20 +40,33 @@ def compute_id_good_occ(data_name, count, categories_instance_array_id_to_cat, c
f2
=
open
(
f
'
{
data_name
}
/Occlusion/
{
count
}
.json
'
)
f2
=
open
(
f
'
{
data_name
}
/Occlusion/
{
count
}
.json
'
)
data2
=
json
.
load
(
f2
)
data2
=
json
.
load
(
f2
)
categories_occ_array
=
{}
categories_array_filtered
=
{}
categories_array
=
{}
categories_array_filtered_occ
=
{}
categories_array_all
=
{}
categories_array_all_occ
=
{}
for
cat
in
categories_instance_array_cat_to_id
:
for
cat
in
categories_instance_array_cat_to_id
:
categories_occ_array
[
cat
]
=
[]
categories_array_filtered
[
cat
]
=
[]
categories_array
[
cat
]
=
[]
categories_array_filtered_occ
[
cat
]
=
[]
categories_array_all
[
cat
]
=
[]
categories_array_all_occ
[
cat
]
=
[]
for
i
in
data2
:
for
i
in
data2
:
if
i
[
'
occlusion_value
'
]
>=
Occ_wanted
:
if
i
[
'
occlusion_value
'
]
>=
Occ_wanted
:
categories_occ_array
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
id
'
])
categories_array_filtered
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
id
'
])
elif
i
[
'
occlusion_value
'
]
>=
0.05
and
i
[
'
occlusion_value
'
]
<
Occ_wanted
:
categories_array_filtered_occ
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
occlusion_value
'
])
categories_array
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
id
'
])
if
i
[
'
occlusion_value
'
]
>=
0.05
:
categories_array_all
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
id
'
])
categories_array_all_occ
[
categories_instance_array_id_to_cat
[
i
[
'
id
'
]]].
append
(
i
[
'
occlusion_value
'
])
# Closing file
# Closing file
f2
.
close
()
f2
.
close
()
return
categories_occ_array
,
categories_array
#print(categories_array_filtered)
\ No newline at end of file
#print(categories_array_filtered_occ)
#print(categories_array_all)
#print(categories_array_all_occ)
return
categories_array_filtered
,
categories_array_filtered_occ
,
categories_array_all
,
categories_array_all_occ
\ No newline at end of file
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