Skip to content

Commit

Permalink
Fix Image Listing Error for Benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu authored Jan 9, 2025
2 parents f3038d8 + c929cf9 commit 8e1f1da
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion train/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM supervisely/yolov8:1.0.42
FROM supervisely/yolov8:1.0.43

# RUN pip3 install git+https://github.com/supervisely/supervisely.git@model-benchmark
RUN pip3 install setuptools==69.5.1
Expand Down
50 changes: 26 additions & 24 deletions train/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2130,18 +2130,19 @@ def get_image_infos_by_split(split: list):
if "/" in dataset_name:
dataset_name = dataset_name.split("/")[-1]
ds_info = ds_infos_dict[dataset_name]
image_infos.extend(
api.image.get_list(
ds_info.id,
filters=[
{
"field": "name",
"operator": "in",
"value": image_names,
}
],
)
)
for batched_names in sly.batched(image_names, 200):
batch = api.image.get_list(
ds_info.id,
filters=[
{
"field": "name",
"operator": "in",
"value": batched_names,
}
],
force_metadata_for_links=False,
)
image_infos.extend(batch)
return image_infos

val_image_infos = get_image_infos_by_split(val_set)
Expand Down Expand Up @@ -3177,18 +3178,19 @@ def get_image_infos_by_split(split: list):
if "/" in dataset_name:
dataset_name = dataset_name.split("/")[-1]
ds_info = ds_infos_dict[dataset_name]
image_infos.extend(
api.image.get_list(
ds_info.id,
filters=[
{
"field": "name",
"operator": "in",
"value": image_names,
}
],
)
)
for batched_names in sly.batched(image_names, 200):
batch = api.image.get_list(
ds_info.id,
filters=[
{
"field": "name",
"operator": "in",
"value": batched_names,
}
],
force_metadata_for_links=False,
)
image_infos.extend(batch)
return image_infos

val_image_infos = get_image_infos_by_split(val_set)
Expand Down

0 comments on commit 8e1f1da

Please sign in to comment.