449 Commits

Author SHA1 Message Date
Lauren Sell
b33f965b6d Readme updates (#950)
Adds information about Label Studio community to welcome LabelImg users
2022-09-22 15:12:32 -07:00
Ding
2d5537bad5 docs: update virtualenv section of readme (#911) 2022-07-09 19:53:33 -07:00
dependabot[bot]
dcc5e23485 Bump lxml from 4.6.5 to 4.9.1 in /requirements (#909)
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.5 to 4.9.1.
- [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.5...lxml-4.9.1)

---
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>
2022-07-06 18:47:50 -07:00
s_teja
5bc7fb9a9c CreateML fixes (#906)
Support createML format
2022-07-05 13:48:10 -07:00
tzutalin
eb603c29e1 Fix unexpected type 'float' labelImg in labelDialog 2022-06-18 23:38:03 -07:00
tzutalin
1c94399b91 Fix wrong link for different readme in diffeerent locales 2022-06-14 23:12:04 -07:00
tzutalin
dd6e530961 Update build badge 2022-06-14 23:07:24 -07:00
tzutalin
5a3899c2e0 Update README 2022-06-14 22:56:28 -07:00
tzutalin
3a360ad8f5 Revert "Create pylint.yml"
This reverts commit 1efa3d80d2.
2022-06-14 22:39:47 -07:00
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
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
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
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
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
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
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
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
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
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
Naelson Douglas C. Oliveira
e9dbbd80bc removed a default mutable argument pitfall (#809) 2021-10-31 08:21:18 -07:00
tzutalin
1ab8241d0e bump version to 1.8.6 v1.8.6 2021-10-11 13:15:19 -07:00
Tiger Nie
3f53dce960 display bbox width and height while resizing, moving and hovering over (#798)
shape.
2021-10-11 13:04:40 -07:00
tzutalin
7457d58249 update instruction to install with pipenv 2021-10-11 13:04:03 -07:00
Enzo Di Tizio
cc8fd5a703 Changing installation methods order (#796)
Just to put the easiest one first.
2021-10-03 11:25:56 -07:00
ngc92
58406b578a adds a utility function to hide a QT5/QT4 discrepancy (#765)
Co-authored-by: erik <ersre>
2021-07-25 09:09:01 -07:00
Keito Tobichi
c5971bffab Japanese Translation Fix. (#760)
* fix.

* small fix.

* translation fix.

* shortcut fix.
2021-07-17 20:45:26 -07:00
Keito Tobichi
250de4bef8 Add Locale: Japanese (#756)
* [wip]japanese translation file.

* [wip]fixed japanese translation.

* create README.jp.rst

* add locale ja-JP.

* Removed Locale Data.
2021-06-27 14:42:27 -07:00
darrenl
d3e502439c Update no-response.yml 2021-06-06 07:50:01 -07:00
tzutalin
ff681f7054 Remove unused code and add short cut link 2021-05-11 09:39:28 -07:00
WEN Hao
91c23d0a9d Use webbrowser instead of get_available_screencast_viewer (#745)
* improve opening tutorial

* improve show_tutorial_dialog

* improve show_tutorial_dialog

* remove not implemented

* remove unncessary package QtWebEngineWidgets

* remove commented import of QtWebEngineWidgets
2021-05-11 09:20:54 -07:00
tzutalin
c4e8cd8390 Add .github/no-response.yml 2021-05-01 08:14:54 -07:00