HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.8k stars 6.31k forks source link

feature suggestions #610

Open chrisrapson opened 4 years ago

chrisrapson commented 4 years ago

First of all, thanks for developing an excellent tool and making it available! Our team has built our workflow around it and annotated about 1000 images already. While we were doing that, we came up with a few ideas for improvements. I have actually implemented them already, and could provide a PR for some or all of them, as you prefer.

  1. adjust the position of the labelDialog that pops up after drawing the bounding box to choose the class. At the moment, if the second vortex of the bounding box is close to the bottom of the screen, the dialog box can "pop up" out of view. I modified the positioning to make sure that the popup is always within the bounds of the parentWidget.
  2. toggle all boxes instead of hide/show (more intuitive for me, and also saves a shortcut key in case you need it later)
  3. allow panning by clicking and dragging
  4. improved the MessageBox that pops up when you click Next/Prev without saving the image. A few of our developers were expecting that "Yes" meant "Save and Continue", based on intuition from other software. They didn't read carefully enough, and ended up accidentally deleting the unsaved annotations.
  5. removed unicode characters (arrows) from README because they gave an error when I download the code and ran pip install -e . --user. (It would probably be better to replace them, rather than delete them, but I was looking for a quick fix.)
  6. This one is more specific to our environment, so might not be useful to you. Then again, it doesn't break anything, so you can think about it. For our environment, I have included labelImg as part of a larger package. In order to make that work, I had to change the import statements to relative imports. Relative imports still work for labelImg as a standalone package

One more thing: I think, but am not completely sure, that you should subtract 1 when loading VOC bounding box coordinates. (And +1 when saving them.) That is because VOC was originally developed in matlab, and uses 1-based indices. We are using YOLO's annotation format, so this didn't affect us and I haven't modified anything.

radek1991 commented 4 years ago

Hey @chrisrapson at what price point supported and improved version of this tool is still interesting for you :) ?

chrisrapson commented 4 years ago

@radek1991 I don't understand. The license on this repository is MIT, so it is free in all respects. Having access to the code allowed me to make modifications (I would say "improvements" but that's only subjective until I get input from others). I'm offering those modifications as a pull request - also free.

chrisrapson commented 4 years ago

@tzutalin are you interested in a pull request for the other suggestions?

tzutalin commented 4 years ago

Sure. I am open to any pull request if it can be beneficial to users

wch1446 commented 4 years ago

当然。我愿意接受任何拉动请求,如果这对用户有利

allow panning by clicking and dragging 这个怎么实现呢

chrisrapson commented 4 years ago

Hi @wch1446 I'm sorry I didn't understand your message. Is that the mandarin translation for "allow panning by clicking and dragging"? Are you asking for it to be included in a menu or readme somewhere?

wch1446 commented 4 years ago

@ wch1446您好,很抱歉,我不明白您的消息。那是“允许通过单击和拖动来平移”的普通话翻译吗?您是否要求将其包含在菜单或自述文件中?

你的那个第三个要求是怎么实现呢? 我是中国人不好意思 英文不好 也不是程序员 只是现在有个项目用到了这个工具 发现放大图片后不能去拖动图片 去标注的时候效率很低 不知道你实现的是不是放大图片后能随意去拖动图片?

chrisrapson commented 4 years ago

@wch1446 assuming the automatic translations are working correctly, I understand you're asking about how I implemented the panning by click and drag? You can see the changes in this commit:

https://github.com/tzutalin/labelImg/pull/636/commits/cbfd1f8410b4f4ffbe92658e736e8a157887cc96

Basically, while the mouse button is held down, it uses the motion of the cursor to change the offset position of the frame. It works for me, and since tzutalin accepted the pull request, I assume it works for them. If you can provide any more details on why/when it's not working for you, I'd be happy to look into it.

wch1446 commented 4 years ago

@wch1446 assuming the automatic translations are working correctly, I understand you're asking about how I implemented the panning by click and drag? You can see the changes in this commit:

cbfd1f8

Basically, while the mouse button is held down, it uses the motion of the cursor to change the offset position of the frame. It works for me, and since tzutalin accepted the pull request, I assume it works for them. If you can provide any more details on why/when it's not working for you, I'd be happy to look into it.

I got it wrong. Your translation is to pull out the box to translate. What I want is that the marked picture can be translated after zooming in