Skip to content

Commit

Permalink
Merge branch 'develop' into metadata-filters
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Mar 24, 2022
2 parents b738fa8 + 134c1fc commit e7b68fd
Show file tree
Hide file tree
Showing 27 changed files with 3,994 additions and 137 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,14 @@ jobs:
find tests/isolated/ -name '*.py' -print0 | xargs -0 --verbose -n1 python tests/utils/pytest_wrapper.py --verbose
# these are somewhat slower/more bandwidth-intensive, so only run them if
# github_actions_flags.py determined that they should be run
- name: Test quickstarts
if: ${{ steps.test_config.outputs.run_integration == 'true' }}
env:
FIFTYONE_EXIT: 1
run: |
fiftyone quickstart --remote
fiftyone quickstart --remote --video
# Skip: Google Drive unstable
# - name: Test quickstarts
# if: ${{ steps.test_config.outputs.run_integration == 'true' }}
# env:
# FIFTYONE_EXIT: 1
# run: |
# fiftyone quickstart --remote
# fiftyone quickstart --remote --video

all-tests:
needs: test
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fiftyone/fiftyone",
"productName": "FiftyOne",
"version": "0.19.2",
"version": "0.19.3",
"license": "Apache-2.0",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion app/packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fiftyone/app",
"version": "0.19.2",
"version": "0.19.3",
"license": "Apache-2.0",
"private": true,
"scripts": {
Expand Down
73 changes: 66 additions & 7 deletions docs/source/integrations/cvat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ provided:
This argument can be a list of usernames when annotating videos as each
video is uploaded to a separate task
- **job_assignees** (*None*): a list of usernames to assign jobs
- **job_reviewers** (*None*): a list of usernames to assign job reviews
- **job_reviewers** (*None*): a list of usernames to assign job reviews. Only
available in CVAT v1 servers
- **project_name** (*None*): an optional project name to which to upload the
created CVAT task. If a project with this name exists, it will be used,
otherwise a new project is created. By default, no project is used
Expand Down Expand Up @@ -660,7 +661,7 @@ attribute that you wish to label:
anno_key = "..."
attributes = {
"occluded": {
"is_truncated": {
"type": "radio",
"values": [True, False],
"default": False,
Expand Down Expand Up @@ -848,7 +849,7 @@ object:
"values": ["sedan", "suv", "truck"],
"mutable": False,
},
"occluded": {
"visible_license_plate": {
"type": "radio",
"values": [True, False],
"default": False,
Expand Down Expand Up @@ -1008,6 +1009,13 @@ to see the available keys on a dataset.
However, you can pass `cleanup=True` to delete all information associated
with the run from the backend after the annotations are downloaded.

You can use the optional `dest_field` parameter to override the task's
label schema and instead load annotations into different field name(s) of your
dataset. This can be useful, for example, when editing existing annotations, if
you would like to do a before/after comparison of the edits that you import. If
the annotation run involves multiple fields, `dest_field` should be a
dictionary mapping label schema field names to destination field names.

Note that CVAT cannot explicitly prevent annotators from creating labels that
don't obey the run's label schema. However, you can pass the optional
`unexpected` parameter to
Expand Down Expand Up @@ -1416,7 +1424,7 @@ involves multiple fields:
"type": "keypoints",
"classes": ["person", "cat", "dog", "food"],
"attributes": {
"occluded": {
"is_truncated": {
"type": "select",
"values": [True, False],
}
Expand Down Expand Up @@ -1644,7 +1652,8 @@ specify which users will be assigned to the created tasks:
can be a list of usernames when annotating videos as each
video is uploaded to a separate task
- `job_assignees`: a list of usernames to assign jobs
- `job_reviewers`: a list of usernames to assign job reviews
- `job_reviewers`: a list of usernames to assign job reviews. Only available
in CVAT v1 servers

If the number of jobs exceeds the number of assignees or reviewers, the jobs
will be assigned using a round-robin strategy.
Expand All @@ -1662,7 +1671,9 @@ will be assigned using a round-robin strategy.
task_assignee = "username1"
job_assignees = ["username2", "username3"]
job_reviewers = ["username4", "username5", "username6", "username7"]
# If using a CVAT v1 server
# job_reviewers = ["username4", "username5", "username6", "username7"]
# Load "ground_truth" field into one task
# Create another task for "keypoints" field
Expand All @@ -1680,7 +1691,6 @@ will be assigned using a round-robin strategy.
segment_size=2,
task_assignee=task_assignee,
job_assignees=job_assignees,
job_reviewers=job_reviewers,
launch_editor=True,
)
print(dataset.get_annotation_info(anno_key))
Expand Down Expand Up @@ -1956,6 +1966,55 @@ attributes between annotation runs.
:alt: cvat-occ-widget
:align: center

.. _cvat-destination-field:

Changing destination field
--------------------------

When annotating an existing label field, it can be useful to load the
annotations into a different field than the one used to upload annotations. The
`dest_field` parameter can be used for this purpose when calling
:meth:`load_annotations() <fiftyone.core.collections.SampleCollection.load_annotations>`.

If your annotation run involves a single label field, set `dest_field`
to the name of the (new or existing) field you wish to load annotations into.

If your annotation run involves multiple fields, `dest_field` should be
a dictionary mapping existing field names in your run's label schema to updated
destination fields.

.. code:: python
:linenos:
import fiftyone as fo
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart").clone()
view = dataset.take(1)
anno_key = "dest_field"
label_field = "ground_truth"
# Upload from `ground_truth` field
view.annotate(
anno_key,
label_field=label_field,
)
print(dataset.get_annotation_info(anno_key))
# Load into `test_field`
dest_field = "test_field"
# If your run involves multiple fields, use this syntax instead
# dest_field = {"ground_truth": "test_field", ...}
dataset.load_annotations(
anno_key,
cleanup=True,
dest_field=dest_field,
)
dataset.delete_annotation_run(anno_key)
.. _cvat-annotating-videos:

Annotating videos
Expand Down
17 changes: 12 additions & 5 deletions docs/source/integrations/labelbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ For Labelbox, the following `type` values are supported:
- `text`: a free-form text box. In this case, `values` is unused
- `select`: a selection dropdown. In this case, `values` is required
- `radio`: a radio button list UI. In this case, `values` is required
- `checkbox`: a list of checkboxes. In this case, `values` is required
- `checkbox`: a list of checkboxes. In this case, `values` is required

When you are annotating existing label fields, the `attributes` parameter can
take additional values:
Expand All @@ -687,7 +687,7 @@ take additional values:
Note that only scalar-valued label attributes are supported. Other attribute
types like lists, dictionaries, and arrays will be omitted.

.. note::
.. note::

Labelbox does not support default values for attributes, so the `default`
key :ref:`described here <annotation-label-attributes>` will be ignored if
Expand Down Expand Up @@ -767,6 +767,13 @@ to see the available keys on a dataset.
However, you can pass `cleanup=True` to delete all information associated
with the run from the backend after the annotations are downloaded.

You can use the optional `dest_field` parameter to override the task's
label schema and instead load annotations into different field name(s) of your
dataset. This can be useful, for example, when editing existing annotations, if
you would like to do a before/after comparison of the edits that you import. If
the annotation run involves multiple fields, `dest_field` should be a
dictionary mapping label schema field names to destination field names.

.. _labelbox-managing-annotation-runs:

Managing annotation runs
Expand Down Expand Up @@ -1294,7 +1301,7 @@ For example, let's upload some blurred images to Labelbox for annotation:
.. image:: /images/integrations/labelbox_alt_media.png
:alt: labelbox-alt-media
:align: center

.. _labelbox-classes-as-attrs:

Annotating classes directly
Expand All @@ -1306,7 +1313,7 @@ annotated, the class name is then selected as an attribute.

However, it can be useful to directly show the object classes at the top-level
of the sidebar to avoid additional clicks. The `classes_as_attrs` argument can
be set to `False` to provide this functionality.
be set to `False` to provide this functionality.

.. note::

Expand Down Expand Up @@ -1481,7 +1488,7 @@ annotation run:
Deleting projects
-----------------

You can use
You can use
:meth:`delete_project() <fiftyone.utils.labelbox.LabelboxAnnotationAPI.delete_project>`
or
:meth:`delete_projects() <fiftyone.utils.labelbox.LabelboxAnnotationAPI.delete_projects>`
Expand Down
76 changes: 76 additions & 0 deletions docs/source/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,82 @@ FiftyOne Release Notes

.. default-role:: code

.. _release-notes-v0.15.0:

FiftyOne 0.15.0
---------------
*Released March 23, 2022*

App

- Fixed :class:`Regression <fiftyone.core.labels.Regression>` rendering in the
visualizer `#1604 <https://github.com/voxel51/fiftyone/pull/1604>`_

Core

- Added a :meth:`Dataset.delete_frames() <fiftyone.core.dataset.Dataset.delete_frames>`
method that allows for deleting frames by ID
`#1650 <https://github.com/voxel51/fiftyone/pull/1650>`_
- Added a :meth:`keep_fields() <fiftyone.core.view.DatasetView.keep_fields>`
method to |DatasetView| and its subclasses
`#1616 <https://github.com/voxel51/fiftyone/pull/1616>`_
- Added a :func:`fiftyone.core.plots.base.lines()` method that allows for
plotting lines whose scatter points can be interactively selected via the
typical
`interactive plotting workflows <https://voxel51.com/docs/fiftyone/user_guide/plots.html>`_
`#1614 <https://github.com/voxel51/fiftyone/pull/1614>`_
- Added an optional `force_rgb=True` syntax when importing/exporting/creating
TF records using all relevant methods in :mod:`fiftyone.utils.tf`
`#1612 <https://github.com/voxel51/fiftyone/pull/1612>`_
- Added support for passing additional kwargs to the `fiftyone convert` CLI
command
`#1612 <https://github.com/voxel51/fiftyone/pull/1612>`_
- Added support for annotating video-level labels when using
:func:`draw_labeled_videos() <fiftyone.utils.annotations.draw_labeled_videos>`
`#1619 <https://github.com/voxel51/fiftyone/pull/1619>`_
- Added the ability to slice using a |ViewField|
`#1630 <https://github.com/voxel51/fiftyone/pull/1630>`_
- Fixed bug in :func:`from_images_dir() <fiftyone.utils.tf.from_images_dir>`
where attempting to load 4-channel images errored even if `force_rgb=True`
`#1632 <https://github.com/voxel51/fiftyone/pull/1632>`_
- Fixed a bug that prevented frames from being attached to video collections
when aggregating expressions that involve both |Sample|-level and
|Frame|-level fields
`#1644 <https://github.com/voxel51/fiftyone/pull/1644>`_
- Added support for importing :ref:`image <OpenLABELImageDataset-import>` and
:ref:`video <OpenLABELVideoDataset-import>` datasets in
`OpenLABEL format <https://www.asam.net/index.php?eID=dumpFile&t=f&f=3876&token=413e8c85031ae64cc35cf42d0768627514868b2f#_introduction>`_
`#1609 <https://github.com/voxel51/fiftyone/pull/1609>`_

Annotation

- Added support for CVATv2 servers when using the CVAT backend
`#1638 <https://github.com/voxel51/fiftyone/pull/1638>`_
- Added an `issue_tracker` argument to
:meth:`annotate() <fiftyone.core.collections.SampleCollection.annotate>`
when using the CVAT backend
`#1625 <https://github.com/voxel51/fiftyone/pull/1625>`_
- Added a `dest_field` argument to
:func:`load_annotations() <fiftyone.utils.annotations.load_annotations>`
which allows you to specify the name of the field to which to load annotations
`#1642 <https://github.com/voxel51/fiftyone/pull/1642>`_
- Added a property to annotation backends that decides whether to allow
annotation of video-level labels
`#1655 <https://github.com/voxel51/fiftyone/pull/1655>`_
- Fixed a bug where views that dynamically modify label strings would result in
labels not being uploaded to the annotation backend
`#1647 <https://github.com/voxel51/fiftyone/pull/1647>`_

Docs

- Added :ref:`documentation <custom-embedded-documents>` for defining custom
|EmbeddedDocument| and |DynamicEmbeddedDocument| classes
`#1617 <https://github.com/voxel51/fiftyone/pull/1617>`_
- Added :ref:`documentation <view-slicing>` about boolean view indexing to the
user guide `#1617 <https://github.com/voxel51/fiftyone/pull/1617>`_
- Added a :doc:`recipe </recipes/creating_views>` for creating views and view
expressions `#1641 <https://github.com/voxel51/fiftyone/pull/1641>`_

.. _release-notes-v0.14.4:

FiftyOne 0.14.4
Expand Down
7 changes: 7 additions & 0 deletions docs/source/user_guide/annotation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,13 @@ to see the available keys on a dataset.
However, you can pass `cleanup=True` to delete all information associated
with the run from the backend after the annotations are downloaded.

You can use the optional `dest_field` parameter to override the task's
label schema and instead load annotations into different field name(s) of your
dataset. This can be useful, for example, when editing existing annotations, if
you would like to do a before/after comparison of the edits that you import. If
the annotation run involves multiple fields, `dest_field` should be a
dictionary mapping label schema field names to destination field names.

Some annotation backends like CVAT cannot explicitly prevent annotators from
creating labels that don't obey the run's label schema. You can pass the
optional `unexpected` parameter to
Expand Down
Loading

0 comments on commit e7b68fd

Please sign in to comment.