cartucho / openlabeling Goto Github PK
View Code? Open in Web Editor NEWLabel images and video for Computer Vision applications
License: Apache License 2.0
Label images and video for Computer Vision applications
License: Apache License 2.0
The code generates files which sometimes have x,y values > 1. Making the following changes fixes this problem
Line 216: height, width = tmp_img.shape[:2]
Line 221: draw_line(tmp_img, mouse_x, mouse_y, height, width)
Cheers!
How can I select a box and change the label without drawing an new box?
Hello João Cartucho
Can OpenLabeling label a video? For example frame 1 to 100 are class 1, frame 101 to 200 are class2.
When I put my video(mp4 format) in input/. I got some errors:
Traceback (most recent call last): File "D:/PythonProject/OpenLabeling-1.3/run.py", line 357, in <module> cv2.createTrackbar(TRACKBAR_IMG, WINDOW_NAME, 0, last_img_index, change_img_index) cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window_w32.cpp:2059: error: (-211:One of arguments' values is out of range) Bad trackbar maximal value in function 'icvCreateTrackbar'
Hey, thanks for this great project.
I was trying to use this tool today and noticed some errors:
Would it make sense to not use the DaSiamRPN as submodule and change the code to have the cuda commands be optional?
hello, i hope you are all doing well, i have a question concerning each single numeric value in the output file( yolo), what does each specific number mean? i was able to discover that the first digit of every line is the class id of the detected object but that's it, i also know that the following 4 numbers are the position of the object in question, and i want to have more details if possible about each value and what does it represent.
thanks!!!
When labeling frames of a video it is a common occurrence to have some frames with nothing in them that you want to label. Would be nice to have a button that removes a selected frame from the data set (including its .xml/.txt file). Any interest in this?
C:\Users\dolan\Downloads\OpenLabeling-master\main>python main.py
Traceback (most recent call last):
File "C:\Users\dolan\Downloads\OpenLabeling-master\main\dasiamrpn.py", line 16, in
from DaSiamRPN.code.run_SiamRPN import SiamRPN_init, SiamRPN_track
File "C:\Users\dolan\Downloads\OpenLabeling-master\main\DaSiamRPN\code\run_SiamRPN.py", line 11, in
from utils import get_subwindow_tracking
ImportError: cannot import name 'get_subwindow_tracking' from 'utils' (C:\Users\dolan\AppData\Local\Programs\Python\Python37\lib\site-packages\utils_init_.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 15, in
from dasiamrpn import dasiamrpn
File "C:\Users\dolan\Downloads\OpenLabeling-master\main\dasiamrpn.py", line 36, in
from DaSiamRPN.code.run_SiamRPN import SiamRPN_init, SiamRPN_track
File "C:\Users\dolan\Downloads\OpenLabeling-master\main\DaSiamRPN\code\run_SiamRPN.py", line 11, in
from utils import get_subwindow_tracking
ImportError: cannot import name 'get_subwindow_tracking' from 'utils' (C:\Users\dolan\AppData\Local\Programs\Python\Python37\lib\site-packages\utils_init_.py)
C:\Users\dolan\Downloads\OpenLabeling-master\main>
Why?
I have found a minor bug on click-drag resizing.
The steps are:
Actions:
ipython run.py
Click anywhere
Error:
--> 245 cv2.rectangle(tmp_img, point_1, (mouse_x, mouse_y), color, 2)
TypeError: Scalar value for argument 'color' is not numeric
Workaround:
Pull request: https://github.com/Cartucho/yolo-boundingbox-labeler-GUI/pull/5/files
Description: Add .tolist()
to color
.
Environment:
Ubuntu 16.04, Python 3.6.3, Anaconda 5.0.1, OpenCV 3.4.0
I have anaconda installed on my Windows 10 desktop. I installed OpenLabeling and it was working just fine. Sometimes, when I loaded some images on the input(empty file) and the .txt annotations (from an already annotated dataset) on the output(empty file), to see if I could see the annotation work from ready datasets, the program crashed and I had to restart the command prompt again.
Doing these experiments to find out how OpenLabeling works, for some unknown reason, it started displaying the image paths twice. Everytime I press "a", "d", "w" and "s" to change image or label, it displays twice the path name which is pretty annoying if you have to work on OpenLabeling for many hours.
You can see below how it looks like:
On the other hand, on Virtual Machine (Linux Mint) it works pretty good, added the zoom in/zoom out feature which doesn't exist when using Windows. Although when holding left click to move the image (when zoomed in), it starts to create an bounding box which you have to remove later.
I believe OpenLabeling is by far the best labeling tool!!
I would appreciate a solution to this "double-show-path&class" problem.
Thanks in advance!
EDIT:
I don't have this problem with this older version of OpenLabeling: https://github.com/rcabg/OpenLabeling
FINAL EDIT:
Comparing the previous code (run.py from https://github.com/rcabg/OpenLabeling) a possible solution I found was to comment the lines:
1125 set_img_index(img_index)
1135 set_class_index(class_index)
on main.py. I realised it because it was only double displaying image and class names.
Please confirm it doesn't affect the code.
Also, I find it more elegant to change the lines:
FROM:
1066 # initialize
1067 set_img_index(0)
1068 edges_on = False
1069
1070 display_text('Welcome!\n Press [h] for help.', 4000)
TO:
1066 display_text('Welcome to OpenLabeling!\nPress [h] for help.\n', 4000)
1067
1068 # initialize
1069 set_img_index(0)
1070 edges_on = False
I look forward for someone to confirm that these changes do not affect the code.
We owe to evolve the code! Thank you!
hi, i have a small suggestions to enhance open labelling, for video usage the frame boxes are basically the same, i suggest that we should add a feature that allows to load the bouding boxes from the previous frame and add a button to move the box around so that it become muc hquicker the treat data from videos.
cordially.
How are the bbox defined at the output?
$ python main.py
Traceback (most recent call last):
File "main.py", line 971, in
cv2.createTrackbar(TRACKBAR_IMG, WINDOW_NAME, 0, last_img_index, set_img_index)
cv2.error: OpenCV(3.4.5) /io/opencv/modules/highgui/src/window_QT.cpp:1223: error: (-27:Null pointer) Max value of the slider must be bigger than 0 in function 'addSlider2'
Good repo! Recently, I want to do the tracking work. I need the id infomation in each oject. The class of label is used to detection. But I need id for trajectories.
Hello thanks for your work,
but i have some problem. when the UI is open and i try to make bounding box in example image the program got error (Not responding), it says :
File "D:/andiki/yolo-boundingbox-labeler-GUI-master/run.py", line 105, in save_bb
with open(txt_path, 'a') as myfile:
FileNotFoundError: [Errno 2] No such file or directory: 'bbox_txt/images\img3.txt'
i use
spyder 3.2.3
python 3.6
opencv 3.4.1
numpy 1.11.3
thanks in advance sir
Sometimes when switching between frames with predicted bounding boxes, I get this error
Traceback (most recent call last):
File "main.py", line 1007, in
tmp_img = draw_bboxes_from_file(tmp_img, annotation_paths, width, height)
File "main.py", line 344, in draw_bboxes_from_file
tree = ET.parse(ann_path)
File "", line 62, in parse
File "", line 38, in parse
cElementTree.ParseError: no element found: line 1, column 0
Can someone help me with this.
By the way this is the first time I am here so forgive me if I did something wrong
Hello,
we use OpenLabeling in a team of students to label image data and we use the
Darknet YOLO format. Recently, I wanted to check some labeled images using this tool, but I found out
that the bounding boxes use the PASCAL_VOC
folder by default. Since I only have the Darknet data, the PASCAL_VOC
folder gets auto-populated with empty files, meaning that no bounding boxes get shown even though I have them in the YOLO_darknet
folder.
I solved this problem by simply reading the bb data from the Darknet folder, but I thought we could maybe add a switch somewhere in the code that would draw bounding boxes from the YOLO_darknet
folder in case the PASCAL_VOC
folder does not exist. What do you think about this? I could submit a PR if you're interested.
The purpose of this tool is to make labeling as easy and fast as possible.
Initial ideas:
Discuss here your opinions.
When I change GOTURN tracker in main.py, run the program, select a bounding box, and press 'p', the program crashes with the following error message:
Traceback (most recent call last): File "main.py", line 1084, in <module> label_tracker.start_tracker(json_file_data, json_file_path, img_path, obj, color, annotation_formats) File "main.py", line 846, in start_tracker tracker.init(self.init_frame, initial_bbox) cv2.error: OpenCV(3.4.5) /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "goturn.prototxt" in function 'ReadProtoFromTextFile'
Ubuntu 18.04 LTS, python 3.6.7, installed everything in a fresh virtualenv with requirements.txt
Thanks
1> When I double-click at a bounding box, then is_bbox_selected is set to True
2> Right after that, a one-click event is trigger automatically, and is_bbox_selected is set to False
I found 2 solutions for that:
First: Using timer as mentioned on this https://stackoverflow.com/questions/21373110/how-to-distinguish-between-click-and-double-click-in-opencv
Second: I changed the code a bit in the event listener:
elif event == cv2.EVENT_LBUTTONDOWN:
if not prev_was_double_click:
print('Normal left click')
if point_1[0] is -1:
if is_bbox_selected:
if is_mouse_inside_delete_button():
edit_bbox('delete')
is_bbox_selected = False
else:
# first click (start drawing a bounding box or delete an item)
point_1 = (x, y)
else:
# minimal size for bounding box to avoid errors
threshold = 20
if abs(x - point_1[0]) > threshold or abs(y - point_1[1]) > threshold:
# second click
point_2 = (x, y)
if prev_was_double_click:
#print('Finish double click')
prev_was_double_click = False
Is there any option such that if a person is detected then its should be saved in a file. Such that we can use the saved file to open a house gate(or door) when person is detected nearby using sensors
I am using Mac High Sierra v10.13.2 when I press "D" to the next page, the track bar moves to the next item but the image is still the previous one, it works well on Ubuntu.
Warning: Click the top right point first, if using the current version of the repo.
Solution 1: Swap point_1 with point_2 if point_1 is the bottom right point. This solution will help with the VOC danger mentioned here: #6
Solution 2: Modify get_close_icon and draw_close_icon, and any other related functions
Hi!
I'm working on labeling multiple images with a team, so I receive their *.txt files with the labels. The problem is when I try to watch the marks from an external PC, so I copy the .txt file in the output folder, I can't see this when I run OpenLabeling. Does it use PASCAL files to draw? Is there any way I can load my label's data to OpenLabeling?
Thanks!
Hi!
I would like to use the tracker feature. Does it work now?
If yes, how can I apply tracking for video, please.
Thank you.
~/Desktop/yolo-boundingbox-labeler-GUI master
❯ python run.py
OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in displayOverlay, file /build/opencv/src/opencv-3.4.0/modules/highgui/src/window.cpp, line 528
Traceback (most recent call last):
File "run.py", line 203, in <module>
change_img_index(0)
File "run.py", line 25, in change_img_index
"" + str(last_img_index), 1000)
cv2.error: /build/opencv/src/opencv-3.4.0/modules/highgui/src/window.cpp:528: error: (-213) The library is compiled without QT support in function displayOverlay
python: 3.6.4
numpy: 1.14.0
cv2: 3.4.0
distro: Artix Linux (4.9.77-1-lts #1 SMP Wed Jan 17 16:57:30 UTC 2018 x86_64 GNU/Linux)
is there a way to decrease the mouse cursor delay?
The XML files output from OpenLabeling are off by a pixel in x and y for many of the images. (This caused tensorflow to crash out reporting a size mismatch when I was running with dhSegment.)
To disable the need for second click to finish drawing the box would be good if people use tablets or any other touch device.
Program terminating on non latin input, in my case it was cyrillic.
ASSERT: "false" in file qasciikey.cpp, line 501
Aborted (core dumped)
Hi , I'm trying to set the output directory. and I keep getting this error , I'm hoping you can help or advise
the command I'm running is
python main.py -i d:\datasets\images_in\ -o d:\datasets\images_out\ --tracker DASIAMRPN -n 125
both Directory's exist
I think my issue is the path is missing a backslash \
this is what I get on the error
'd:\datasets\images_out\PASCAL_VOCpeople_walking_mp4\people_walking_mp4_0.xml'
this is what I Think it should be
'd:\datasets\images_out\PASCAL_VOC\people_walking_mp4\people_walking_mp4_0.xml'
for it to find the directory
see full error below
File "main.py", line 1036, in
create_PASCAL_VOC_xml(ann_path, abs_path, folder_name, image_name, img_height, img_width, depth)
File "main.py", line 757, in create_PASCAL_VOC_xml
write_xml(xml_str, xml_path)
File "main.py", line 282, in write_xml
with open(xml_path, 'wb') as temp_xml:
FileNotFoundError: [Errno 2] No such file or directory: 'd:\datasets\images_out\PASCAL_VOCpeople_walking_mp4\people_walking_mp4_0.xml'
can you please help
Brian
In the function delete_selected_bbox(), when comparing counter and selected_bbox, "!=" should be used instead of "is not". Otherwise, some bounding boxes cannot be deleted.
It could be very useful for me if there is the possibility to draw a line segment instead of boundig box
Error
"module 'tensorflow' has no attribute 'GraphDef'"
I cannot run "main_auto.py". Which version of tensorflow should I install?
How to solve?
Error: DaSiamRPN files not found. Please run the following command:
git submodule update --init
Any chance we could get camvid style dataformat as a feature? Essentially masks exported as PNG with category level labels for each pixel ?
My output files are still blank even after performing labelling. When I restart the program, on the gui I can still see my old labels, however the corresponding text files are empty
the save button completely freezes the tool (indefinitely). Changes are saved, but the program has to be forced to close
I am not sure if this is a bug or by design.
(1) When I selected an existing bounding box by double clicking inside its area, the box was selected and the delete button appeared at its upper right corner. At this point prev_was_double_click was set to True.
(2) Then I clicked on the delete button, prev_was_double_click was set to False and this is "Finish double click" according to the comment. Nothing happened on the UI.
(3) Then I needed to click on the delete button again in order to delete that bounding box.
So we need to left click twice to delete. Is this by design?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.