Git Product home page Git Product logo

openlabeling's People

Contributors

alexeygy avatar cartucho avatar fogx avatar jamietownsend avatar jatinmandav avatar jennac3 avatar mattkleinsmith avatar mewiss avatar omrirz avatar seanthegreat7 avatar thecamilovisk avatar vuthede avatar willjstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openlabeling's Issues

ImportError: cannot import name 'get_subwindow_tracking' from 'utils'

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?

output

How are the bbox defined at the output?

GOTURN Tracker not working

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

Outputs not being written

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

Error on main.py

$ 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'

question regarding the output file

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!!!

Draw bounding boxes based on the Darknet YOLO format

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.

Tensorflow Version

Error
"module 'tensorflow' has no attribute 'GraphDef'"

I cannot run "main_auto.py". Which version of tensorflow should I install?

To Save What is detected

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

Predicted frame error

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

Issues installing project after DaSiamRPN Update

Hey, thanks for this great project.

I was trying to use this tool today and noticed some errors:

  • Since the update adding the DaSiamRPN, the installation now requires pytorch to run, as well as to download the correct DaSiamRPN. This is not a big issue, should be added to the installation guide though.
  • The dasiamrpn.py file uses "torch.load(f)" which fails in its current state when no CUDA GPU is installed.
  • The dasiamrpn.py file links to the wrong DaSiamRPN, returning the the BIG network, which of course fails in execution because the tensors are too big (2x).
  • Right now the SiamNetwork Code (in the submodule) uses a couple of CUDA commands.
  • When installing pytorch with conda, executing the main.py shows a warning about Qt not working. export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb fixes this

Would it make sense to not use the DaSiamRPN as submodule and change the code to have the cuda commands be optional?

PASCAL_VOC XML reporting wrong image size

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.)

Terminating on not latin input

Program terminating on non latin input, in my case it was cyrillic.

ASSERT: "false" in file qasciikey.cpp, line 501
Aborted (core dumped)

Image not load when pressing "D" on MacOS

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.

[Windows] Double display on command prompt - Possible solution

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:

anaconda_prompt_image_labeling

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)

first

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

second

I look forward for someone to confirm that these changes do not affect the code.

We owe to evolve the code! Thank you!

DaSiamRPN files not found.

How to solve?

Error: DaSiamRPN files not found. Please run the following command:
git submodule update --init

FileNotFoundError: [Errno 2] No such file or directory: 'bbox_txt/images\\img3.txt'

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

Height and Width swapped

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!

load bouding boxes from previous images.

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.

Can`t capture small objects

Hello,
I can't capture some small objects with bounding box, it's just impossible to set it. However when I try a bit bigger box (that is out of size of my object) it works, looks like it is some limit. See screens attached.
Any suggestions?

OpenCV version '3.4.5'

4-44
15 14-45-23

bug on variable comparison

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.

Load Labels from external files

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!

Camvid dataset format?

Any chance we could get camvid style dataformat as a feature? Essentially masks exported as PNG with category level labels for each pixel ?

A one-click event is trigger by double click event, which cause the program work not as expected.

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

save button freezes program

the save button completely freezes the tool (indefinitely). Changes are saved, but the program has to be forced to close

tracker

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.

How to label a video?

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'

New Features Discussion

The purpose of this tool is to make labeling as easy and fast as possible.

Initial ideas:

  • Use pre-labeled images from Yolo v2;
  • Video Object Tracking;
  • Feature Matching + Homography;
  • Superpixel Segmentation;
  • Grabcut Segmentation;

Discuss here your opinions.

bug on deleting bounding box?

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?

The library is compiled without QT support in function displayOverlay

~/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)

Can't delete box if created bottom right point first

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

Possible feature: button to remove frame from data set

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?

Output dir issue

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.