Commit Graph

3620 Commits

Author SHA1 Message Date
Ryan Hirasaki 62e0da6824 Replace Travis CI with GitHub Actions, and make Windows/Linux builds. (#896) 2022-06-14 22:37:49 -07:00
darrenl 1efa3d80d2 Create pylint.yml 2022-06-14 22:37:24 -07:00
dependabot[bot] 0aa65efcc0 Bump actions/setup-python from 3 to 4 (#1956)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 11:41:14 +02:00
tzutalin bc8041946a Updated translations 2022-06-12 10:41:54 -07:00
tzutalin 267c465eb2 Update .gitignore 2022-06-12 10:31:38 -07:00
tzutalin 94212951ee Switch to travis-ci.com 2022-06-12 10:21:53 -07:00
Stefan Breunig 0c377fc258 move "OK" button below cursor when opening label dialog (#893)
The intent for this change is to allow faster labeling when there
are streaks of the same label occasionally, but not consistently
enough to enable "default label" mode. With this PR the user can
simply click again to confirm the previous selection, without
having to aim for the OK button, or move either hand to the
ENTER button.

The alignment and position change of the buttons is for two reasons:
- it covers less of the drawn shape, easing verification of the
  label to be selected
- the alignment wasn't taken into account for offset calculation.
  It works if the dialog is shown, but that causes the dialog to
  briefly flicker in the old position. Presumably an `adjustSize`
  or similar is needed on more widgets, but I was unable to
  figure out which.
2022-06-12 10:12:19 -07:00
Stefan Breunig 981be1f9c4 consider scale when panning image (#892)
The previous variant calculates the delta by checking how many
"image pixels" the cursor was moved, and then emit an absolute
scrollbar move based on that. However, when zoomed in a single
image pixel can be multiple scroll bar units.

The effect was that panning a zoomed in image was very slow,
giving a rubber band kind of effect. Wiggling the mouse would emit
more deltas, eventually moving the image below the cursor again.

This PR uses the absolute coordinates instead, which keeps the
image closer to the cursor. There is still a slight rubber band
effect, probably due to slight differences between painter and
scroll bar positions/units.

The result is that panning a zoomed in image feels less sluggish.
2022-06-12 10:09:22 -07:00
Stefan Breunig efd90a481b also clear highlights when loading a new image (#891)
This fixes a crash with the following steps to reproduce:
1. highlight a vertex or shape with the cursor
2. swap image using keyboard controls (i.e. press D)
3. left click on image without moving cursor. No shape may be below
   cursor.

What happens is that the canvas will emit a selection signal for
the shape from the previous image, which then can't be found anymore
in `shapes_to_items`, causing this error:

```
Traceback (most recent call last):
  File "/home/stefan/code/labelImg/./labelImg.py", line 806, in shape_selection_changed
    self.shapes_to_items[shape].setSelected(True)
KeyError: <libs.shape.Shape object at 0x7fdb281d06a0>
```

This builds upon the fix from #858, which fixed the issue for
selected shapes, but not highlights.
2022-06-12 10:05:42 -07:00
Stefan Breunig 9e06d10b94 prefer selected shape when highlighting vertexes or shapes (#890)
The use case is adjusting shapes by moving their vertexes, even if
they are adjacent or overlapping another shape. Currently always
the "later drawn" shape wins, making it impossible to adjust an
earlier shape without re-creating it. Adjusting existing shapes is
common for review scenarios.

I have experimented with preferring the highlighted shape, but
I found it finicky and less clear as to how the vertex preference
works. JOSM (and OpenStreetMap editor) also uses the "prefer
selected" approach and it works well there.
2022-06-12 10:05:06 -07:00
Stefan Breunig 1fca69f0b3 actually find nearest point of shape (#889)
For any shape with a dimension smaller than 2*epsilon, there can be
multiple potential points to select from. In practice this resulted
in e.g. the top right corner being highlighted when the cursor was
placed below the bottom right corner.
2022-06-12 10:03:14 -07:00
Stefan Breunig e2d758f540 add brightness controls (#888)
Closes #860
2022-06-12 10:01:41 -07:00
dependabot[bot] 3508a982f5 Bump cirrus-actions/rebase from 1.6 to 1.7 (#1944)
Bumps [cirrus-actions/rebase](https://github.com/cirrus-actions/rebase) from 1.6 to 1.7.
- [Release notes](https://github.com/cirrus-actions/rebase/releases)
- [Commits](https://github.com/cirrus-actions/rebase/compare/1.6...1.7)

---
updated-dependencies:
- dependency-name: cirrus-actions/rebase
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 10:49:39 +02:00
matlabbe 3dae0999bb Merge pull request #120 from lucasw/boost_placeholders
Use C++17 if available, and boost::placeholders::_1/_2/_3 instead of deprecated _1/_2/_3
2022-05-09 11:56:34 -04:00
Lucas Walter 270e8581b9 Use C++17 if available, and boost::placeholders::_1/_2/_3 instead of deprecated _1/_2/_3 2022-05-09 07:39:12 -07:00
dependabot[bot] d58ba5e7a7 Bump github/codeql-action from 1 to 2 (#1939)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-01 22:25:22 -07:00
Zhang Ch. N 861fbe9a2b UX: Increase size of vertex controls around shape (#863)
* Increase shape vertex control size

* Increase canvas epsilon
2022-04-29 23:38:55 -07:00
dependabot[bot] f212505c93 Bump cirrus-actions/rebase from 1.5 to 1.6 (#1929)
Bumps [cirrus-actions/rebase](https://github.com/cirrus-actions/rebase) from 1.5 to 1.6.
- [Release notes](https://github.com/cirrus-actions/rebase/releases)
- [Commits](https://github.com/cirrus-actions/rebase/compare/1.5...1.6)

---
updated-dependencies:
- dependency-name: cirrus-actions/rebase
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 15:07:16 -07:00
Ozan-Alp 1a3313842c Fixed delete selected shape error. (#858)
Co-authored-by: OZAN ALP (096023) <ozanalp@thy.com>
2022-04-15 07:45:42 -07:00
Sahil Chachra ae37b2daa7 Fix ONNX inference code (#1928) 2022-04-11 12:40:56 +02:00
dependabot[bot] c2c113e5eb Bump actions/stale from 4 to 5 (#1927)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 10:25:41 +02:00
pre-commit-ci[bot] 8a372c340c [pre-commit.ci] pre-commit suggestions (#1924)
updates:
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](https://github.com/asottile/pyupgrade/compare/v2.31.0...v2.31.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-04 22:29:34 +02:00
dependabot[bot] 9f9e650bf8 Bump actions/cache from 2.1.7 to 3 (#1920)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:37:53 +02:00
nine 784144aa29 Fixes deleting an image (cf. #822) (#861)
Co-authored-by: Erwin Nindl <erwin@nindl.net>
2022-03-27 10:04:09 -07:00
Glenn Jocher 7093a2b543 PyTorch 1.11.0 compatibility updates (#1914)
* PyTorch 1.11.0 compatibility updates

Resolves `AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'` first raised in https://github.com/ultralytics/yolov5/issues/5499 and observed in all CI runs on just-released PyTorch 1.11.0.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update experimental.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-10 12:59:47 +01:00
PTA00 0bc7a462d9 [tested]Fixed open file dialog cancel error. (#856)
* Fix

Error "IndexError: list index out of range"  occurs when there is no "predefined_classes.txt".

* Fix an error when default label is null.

Error "IndexError: list index out of range"  occurs when there is no "/data/predefined_classes.txt".

* Update README.rst

ADD: Package as a separate exe file method.

* Fixed an error after opening a file to cancel

The cause of the error:
QFileDialog.getOpenFileName(...) second parameter required cannot be empty.
2022-03-08 21:53:45 -08:00
dependabot[bot] b6f6b5b965 Bump actions/checkout from 2 to 3 (#1912)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-08 11:43:15 +01:00
dependabot[bot] e6507907f8 Bump actions/setup-python from 2 to 3 (#1911)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-08 11:42:59 +01:00
PTA00 9e4a4b711e Problems found while packaging as binaries.Has been tested. (#855)
* Fix

Error "IndexError: list index out of range"  occurs when there is no "predefined_classes.txt".

* Fix an error when default label is null.

Error "IndexError: list index out of range"  occurs when there is no "/data/predefined_classes.txt".

* Update README.rst

ADD: Package as a separate exe file method.
2022-03-07 22:56:10 -08:00
tzutalin 0f111e643a Change locale.getlocale() to locale.getdefaultlocale() 2022-03-07 17:54:53 -08:00
tzutalin dd6781656c update translations for zh-CN 2022-03-07 16:55:26 -08:00
tzutalin d685e50269 fix missing imports 2022-02-22 22:23:10 -08:00
Paul Anton Letnes ca3a3accdd remove unused import statements (#845)
To reduce clutter, all unused imports were removed. On the affected
files, imports were also reordered to be PEP8 sorted.
2022-02-17 11:18:21 -08:00
Glenn Jocher 0519223a62 Fix yolov3.yaml remove extra bracket (#1902)
* Fix yolov3.yaml remove extra bracket

Resolves https://github.com/ultralytics/yolov3/issues/1887#issuecomment-1041135181

* Update yolov3.yaml
2022-02-16 10:14:23 +01:00
Aditya Kumar 276f40f5e5 Modified the default label text box into a drop down (#824)
* Modified the default label text box into a drop down

* Unchecked the box at startup

* Removed commented code

* Removed unnecessary update method for the combobox

* Changed naming style for class
2022-01-26 08:18:13 -08:00
Paul Anton Letnes c35efbd480 convert floating point values of zoom level to int (#840)
In some cases, arithmetic results (in particular from division) on zoom
levels return floats; however, the PyQt API requires int values to
function correctly. Therefore, explicit conversion to int or integer
division has been added for these cases.

A behavior bug causing sudden crashes was fixed. When a rectangular box
is dragged with the right mouse button, but the left mouse button is
touched prior to release of the right mouse button, the  program
crashed. The root cause seems to be that this deselects the dragged
object so it is no longer available (i.e. `self.canvas.selected_shape is
None`). The new behavior does nothing / cancels the operation if this
occurs.

Added a shortcut for switching file format (CTRL+Y) since I often use
this functionality.
2022-01-26 08:17:27 -08:00
pre-commit-ci[bot] 0f80f2f905 [pre-commit.ci] pre-commit suggestions (#1883)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.0.1 → v4.1.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.0.1...v4.1.0)
- [github.com/asottile/pyupgrade: v2.23.1 → v2.31.0](https://github.com/asottile/pyupgrade/compare/v2.23.1...v2.31.0)
- [github.com/PyCQA/isort: 5.9.3 → 5.10.1](https://github.com/PyCQA/isort/compare/5.9.3...5.10.1)
- [github.com/PyCQA/flake8: 3.9.2 → 4.0.1](https://github.com/PyCQA/flake8/compare/3.9.2...4.0.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-03 10:33:15 -08:00
Sam.An 98e88371ad Fix opening next image error (#835)
* Fix draw annotations error

* Fix opening next image
2021-12-28 09:10:38 -08:00
Sam.An 5c38b6bcdd Fix draw annotations error (#833) 2021-12-27 19:05:21 -08:00
dependabot[bot] b1e13347dd Bump lxml from 4.6.3 to 4.6.5 in /requirements (#830)
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.3 to 4.6.5.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.3...lxml-4.6.5)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-26 21:04:23 -08:00
Stefan Breunig 9f2765e97b fix h_vertex being kept after deleting shape, causing a crash if used (#832)
Steps to reproduce this particular issue:

1. draw a box
2. select the box
3. hover over one of the corners as if you want to resize the box (no click needed)
4. press DEL to delete the box
5. left click on the canvas

Note there are two more destructive operations on the canvas' `shape` in
`undo_last_line` and `reset_all_lines`, but former is dead code and latter
I don't know how to trigger. Thus I can't be sure un-highlighting will not
lead to visual glitches.

There are other potential fixes, e.g. checking in `selected_vertex`. I can
rework the patch, but then again, the fix is so straight forward that telling
me is probably more effort than just rewriting it.

See #750
See #605
2021-12-26 20:48:39 -08:00
Glenn Jocher 9d0e1cf298 Update requirements.txt (#1869)
* Update requirements.txt

* Add wandb.errors.UsageError

* bug fix
2021-12-01 15:37:56 +01:00
dependabot[bot] c35400cffd Bump actions/cache from 2.1.6 to 2.1.7 (#1867)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-29 12:05:54 +01:00
matlabbe f7c38f91d0 Fixed cmake error without torch 2021-11-20 14:58:15 -05:00
matlabbe 69e63e0778 0.6.4 2021-11-20 13:48:23 -05:00
matlabbe aba19e814a Fixed windows build 2021-11-20 18:40:18 -05:00
matlabbe b2677fdde0 Fixed wrong stamp republished (double precision issue, #48). Fixed region selection with SuperPoint. 2021-11-20 13:23:29 -05:00
HLiang 39ecb789a7 correct initial img_count (#817)
fixes issue https://github.com/tzutalin/labelImg/issues/816
2021-11-19 21:43:57 -08:00
Thinh Phan d4030a71af Update README.rst (#813)
Add "Annotation visualization"
2021-11-18 11:53:18 -08:00
Thinh Phan aa529c3d38 Update requirements-linux-python3.txt (#812)
Update version of pyqt5
2021-11-18 09:04:44 -08:00