You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 10.0.19045
Python version (python --version): 3.9.9
FiftyOne version (fiftyone --version): 0.20.1
FiftyOne installed from (pip or source): pip
Commands to reproduce
As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.
import random
from contextlib import contextmanager
from tempfile import TemporaryDirectory
import fiftyone as fo
from PIL import Image
def create_valid_image(
fileobj,
) -> str:
color_rgb = tuple(random.randint(0, 255) for _ in range(3))
valid_image = Image.new(mode="RGB", size=(192, 108), color=color_rgb)
valid_image.save(fileobj)
@contextmanager
def create_test_images(number_of_images):
with TemporaryDirectory() as temp_dir:
test_image_fileobjs = []
for i in range(number_of_images):
filepath = rf"{temp_dir}\image{i}.png"
create_valid_image(filepath)
test_image_fileobjs.append(filepath)
yield test_image_fileobjs
def random_keypoint():
return fo.Keypoint(
label="some_label",
points=[(random.random(), random.random())],
float_attribute=random.uniform(0, 50),
)
with create_test_images(2) as temp_images:
fo_dataset = fo.Dataset.from_images(temp_images)
sample_id = fo_dataset.last().id
# value of 2 or more renders correctly in app
num_keypoints = 1
keypoints_dict = {
sample_id: fo.Keypoints(
keypoints=[random_keypoint() for _ in range(num_keypoints)]
)
}
fo_dataset.set_values("keypoint_detection", keypoints_dict, key_field="id")
fo_dataset.add_sample_field(
"keypoint_detection.keypoints.float_attribute", fo.FloatField
)
session = fo.launch_app(fo_dataset)
session.wait()
Describe the problem
The custom field for a single keypoint does not work as expected in the side when only a single Keypoints detection is added to a dataset. Instead of showing the value for the float field, None is shown instead.
This prevents filtering to the single image containing the keypoint using the sidebar app filter for the custom attribute field.
This issue does not occur if 2 or more keypoints are included anywhere in a dataset. Tested scenarios 1) 2 or more keypoints on a single image only 2) 2 or more keypoints spread across multiple images. As long as at least 2 keypoints exist the sidebar filter renders as expected.
One Keypoint in Dataset
2 or More Keypoints in Dataset
Code to reproduce issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Other info/logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Please do not use screenshots for sharing text. Code snippets should be used instead when providing tracebacks, logs, etc.
What areas of FiftyOne does this bug affect?
App: FiftyOne application issue
Core: Core Python library issue
Server: FiftyOne server issue
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
Yes. I can contribute a fix for this bug independently
Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
No. I cannot contribute a bug fix at this time
The text was updated successfully, but these errors were encountered:
System information
Windows 10 10.0.19045
python --version
):3.9.9
fiftyone --version
):0.20.1
pip
Commands to reproduce
As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.
Describe the problem
The custom field for a single keypoint does not work as expected in the side when only a single
Keypoints
detection is added to a dataset. Instead of showing the value for the float field,None
is shown instead.This prevents filtering to the single image containing the keypoint using the sidebar app filter for the custom attribute field.
This issue does not occur if 2 or more keypoints are included anywhere in a dataset. Tested scenarios 1) 2 or more keypoints on a single image only 2) 2 or more keypoints spread across multiple images. As long as at least 2 keypoints exist the sidebar filter renders as expected.
One Keypoint in Dataset
2 or More Keypoints in Dataset
Code to reproduce issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Other info/logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Please do not use screenshots for sharing text. Code snippets should be used instead when providing tracebacks, logs, etc.
What areas of FiftyOne does this bug affect?
App
: FiftyOne application issueCore
: Core Python library issueServer
: FiftyOne server issueWillingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
The text was updated successfully, but these errors were encountered: