Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge back 2.3.0 to develop #4095

Merged
merged 13 commits into from
Nov 6, 2024
Merged
29 changes: 29 additions & 0 deletions .github/workflows/pre_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,32 @@ jobs:
rm /tmp/requirements.txt
- name: Run Integration Test
run: tox -vv -e integration-test-${{ matrix.task }}
Integration-Test-Large:
kprokofi marked this conversation as resolved.
Show resolved Hide resolved
if: |
github.event.pull_request.draft == false &&
!(startsWith(github.event.pull_request.title, '[WIP]'))
runs-on: [self-hosted, linux, x64, dev, dmount]
needs: Unit-Test
strategy:
fail-fast: false
matrix:
include:
- task: "detection"
- task: "instance_segmentation"
- task: "semantic_segmentation"
name: Integration-Test-Large-${{ matrix.task }}-py310
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install --require-hashes --no-deps -r .ci/requirements.txt
pip-compile --generate-hashes --output-file=/tmp/requirements.txt --extra=ci_tox pyproject.toml
python -m pip install --require-hashes --no-deps -r /tmp/requirements.txt
rm /tmp/requirements.txt
- name: Run Integration Test
run: tox -vv -e integration-test-${{ matrix.task }}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ All notable changes to this project will be documented in this file.
(<https://github.com/openvinotoolkit/training_extensions/pull/3972>)
- Update model name in rotated detection recipes
(<https://github.com/openvinotoolkit/training_extensions/pull/4028>)
- Fix SupCon flag
(https://github.com/openvinotoolkit/training_extensions/pull/4076)

## \[2.2.0\]

Expand Down
8 changes: 5 additions & 3 deletions src/otx/algo/common/utils/bbox_overlaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,20 @@ def bbox_overlaps(
msg = "bboxes2 must have a last dimension of size 4 or be an empty tensor."
raise ValueError(msg)

if bboxes1.size()[:-2] != bboxes2.size()[:-2]:
if bboxes1.shape[:-2] != bboxes2.shape[:-2]:
msg = "The batch dimension of bboxes must be the same."
raise ValueError(msg)

batch_shape = bboxes1.shape[:-2]

rows = bboxes1.size(-2)
cols = bboxes2.size(-2)

if rows * cols == 0:
warnings.warn("No bboxes are provided! Returning empty boxes!", stacklevel=2)
if is_aligned:
return bboxes1.new(bboxes1.shape[:-2] + (rows,))
return bboxes1.new(bboxes1.shape[:-2] + (rows, cols))
return bboxes1.new(batch_shape + (rows,)) # noqa: RUF005
return bboxes1.new(batch_shape + (rows, cols)) # noqa: RUF005

area1 = (bboxes1[..., 2] - bboxes1[..., 0]) * (bboxes1[..., 3] - bboxes1[..., 1])
area2 = (bboxes2[..., 2] - bboxes2[..., 0]) * (bboxes2[..., 3] - bboxes2[..., 1])
Expand Down
2 changes: 1 addition & 1 deletion src/otx/tools/templates/segmentation/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ learning_parameters:
operator: AND
rules: []
type: UI_RULES
visible_in_ui: true
visible_in_ui: false
warning: null
auto_adapt_batch_size:
affects_outcome_of: TRAINING
Expand Down
Loading