labelme | Image Polygonal Annotation with Python ( polygon | Computer Vision library

 by   wkentaro Python Version: 5.4.1 License: Non-SPDX

kandi X-RAY | labelme Summary

kandi X-RAY | labelme Summary

labelme is a Python library typically used in Telecommunications, Media, Media, Entertainment, Artificial Intelligence, Computer Vision, Deep Learning applications. labelme has no bugs, it has no vulnerabilities, it has build file available and it has medium support. However labelme has a Non-SPDX License. You can install using 'pip install labelme' or download it from GitHub, PyPI.

Labelme is a graphical image annotation tool inspired by It is written in Python and uses Qt for its graphical interface.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              labelme has a medium active ecosystem.
              It has 10519 star(s) with 2986 fork(s). There are 143 watchers for this library.
              There were 5 major release(s) in the last 6 months.
              There are 47 open issues and 639 have been closed. On average issues are closed in 170 days. There are 25 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of labelme is 5.4.1

            kandi-Quality Quality

              labelme has 0 bugs and 0 code smells.

            kandi-Security Security

              labelme has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              labelme code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              labelme has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              labelme releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              labelme saves you 2372 person hours of effort in developing the same functionality from scratch.
              It has 5389 lines of code, 318 functions and 50 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed labelme and discovered the below as its top functions. This is intended to give you an instant insight into labelme implemented functionality, and help decide if they suit your requirements.
            • Mouse move event handler
            • Moves vertex to the bounding box
            • Find the intersection point of two line segments
            • Move shapes to the given position
            • Load label from file
            • Check image height and width and width
            • Load an image file
            • Save image to file
            • Open the previous image
            • Deletes the label file
            • Handle key press events
            • Update the scrollbar
            • Open a directory dialog
            • Open file dialog
            • Get the configuration from a file or yaml
            • Update label
            • Create a new action
            • Mouse release event handler
            • Change the dialog to change the output directory
            • Edit the label
            • Draws the current shape
            • Handle mouse press events
            • Create a new shape
            • Get install requirements
            • Paint the item view
            • Label a docker image on a Docker image
            Get all kandi verified functions for this library.

            labelme Key Features

            No Key Features are available at this moment for labelme.

            labelme Examples and Code Snippets

            准备训练数据
            Pythondot img1Lines of Code : 155dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            cd PaddleDetection/
            ppdet_root=$(pwd)
            
            # 执行代码自动化下载VOC数据集  
            python dataset/voc/download_voc.py
            
            >>cd dataset/voc/
            >>tree
            ├── create_list.py
            ├── download_voc.py
            ├── generic_det_label_list.txt
            ├── generic_det_label_list_zh.txt
            ├── label_list  
            Prepare Training Data
            Pythondot img2Lines of Code : 138dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            cd PaddleDetection/
            ppdet_root=$(pwd)
            
            # Execute code to automatically download VOC dataset
            python dataset/voc/download_voc.py
            
            >>cd dataset/voc/
            >>tree
            ├── create_list.py
            ├── download_voc.py
            ├── generic_det_label_list.txt
            ├── generic_det  
            copy iconCopy
            # python train.py -h
            usage: train.py [-h] [--model_type MODEL_TYPE] [--weights_path WEIGHTS_PATH]
                            [--model_input_shape MODEL_INPUT_SHAPE]
                            [--output_stride {8,16,32}] [--dataset_path DATASET_PATH]
                            [--dat  

            Community Discussions

            QUESTION

            Inference on image dataset without annotations in detectron2
            Asked 2022-Mar-01 at 03:12
            Motivation
            • I have a detectron2 Mask R-CNN baseline model that is good enough to predict some object boundaries accurately.
            • I'd like to convert these predicted boundaries to COCO polygons to annotate the next dataset (supervised labeling).
            • To do this, I need to run inference on an image dataset that does not have annotations.
            • The detectron2 methods register_coco_instances and load_coco_json require images with annotations to properly label the predicted objects.
            Questions
            • Can I register the test dataset without an annotations file?
            • If not, what's the easiest way to generate COCO or Labelme JSON files with basic image info without annotations?
            Code ...

            ANSWER

            Answered 2021-Dec-02 at 14:39

            Here's a method to generate the image details from a directory of images and write it to an existing COCO JSON file:

            Source https://stackoverflow.com/questions/70186513

            QUESTION

            Json file is save like a folder rather than a file
            Asked 2022-Feb-18 at 19:01

            I'm using pixellib package to run machine learning, and when I run my program there is a proccess to create coco dataset with name: train.json. But a folder with train.json is created wrongly and inside this folder there is a file dataset.json, this the file that I need. There is something wrong with the proccess, I found the command that made the coco dataset inside pixellib:

            ...

            ANSWER

            Answered 2022-Feb-18 at 19:01

            The new version didn't work. I used an old version and now is working.

            Source https://stackoverflow.com/questions/71175202

            QUESTION

            pip install labelme failing because FreeType version 2.3 or higher is required
            Asked 2021-Dec-09 at 02:54

            I can't install labelme because I get the error "#error "FreeType version 2.3 or higher is required."

            I did pip install freetype-py==2.3

            But I get the error:

            ...

            ANSWER

            Answered 2021-Dec-08 at 11:32

            You can download labelme directly through the releases page of their github here.

            Source https://stackoverflow.com/questions/70274218

            QUESTION

            pycharm error happening at random time: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
            Asked 2021-Nov-30 at 20:26

            I am working with pycharm community on a tensorflow model with keras backend, sometimes this error appears in a random time, specially after I call pyplot and close the window:

            ...

            ANSWER

            Answered 2021-Nov-30 at 20:26

            Looks like this is part of an actively tracked issue with Tkinter in PyCharm. You can find the reference on the Pycharm's developer's issue tracker. The issue is undiagnosed, but if looking at similar problems with Tk on StackOverflow, one can see that it's an issue with thread safety and/or multithreading.

            All I can do is speculate as to the cause, which is not helpful, however, I can at least collate the suggested workarounds:

            1. Switch to a different Matplotlib backend (See docs: What is a backend?). Such as Qt5, but you will need to make sure they are available in your environment.

              This approach is the most promising as other backends are better able to deal with not being the main thread or are explicitly safe for multi-threading. It's also the simplest unless you have a really specific reason for preferring TkAgg.

            2. Do not use the debugger with interactive plots.

            3. Set "Variables Loading Policy" to "Synchronously" in Debugger as suggested by a PyCharm dev in the linked issue.

            4. Enable "Scientific mode" in Pycharm.

            5. More esoteric workarounds such as closing your figures within the code before drawing the second one. Example, after plotting the first figure:

            Source https://stackoverflow.com/questions/70063350

            QUESTION

            Unable to Load Images to train model on Custom Datasets
            Asked 2020-Nov-04 at 06:58

            I have just stuck with Image Instance Segmentation for a while. I am trying to train the Yolact model for my custom data. Here is some brief information about what I have done so far

            1. I have annotated the image using labelme annotation tool
            2. I have converted annotation file for each (train & validation data) using labelme2coco -> train.json & test.json
            3. I made changes in the cofig.py file as needed and expected by yolact
            4. As I was following this repository I encountered an error Argument 'bb' has incorrect type to which I have solved with the approach stated in this closed issue

            After completing the above task I am stuck here with below-stated issue.

            ...

            ANSWER

            Answered 2020-Nov-04 at 06:58

            You mispelled your folder names :) YolaDataset needs to be renamed to YolactDataset

            Source https://stackoverflow.com/questions/64605776

            QUESTION

            When I run train.py with YOLACT, I get the error KeyError: 0
            Asked 2020-Oct-23 at 15:44

            I'm new to machine learning and program. Now I'm trying to develop YOLACT AI using my own data. However, when I run train.py, I get the following error and cannot learn. What can I do to overcome this error?`

            ...

            ANSWER

            Answered 2020-Oct-19 at 09:47

            Your class id in annotations.json should start from 1 not 0. If they are starting from 0, try this in config.py in your "my_custom_dataset" in label map add this

            Source https://stackoverflow.com/questions/64420059

            QUESTION

            convert labelImg XML rectangles to labelMe JSON polygons with Image data
            Asked 2020-Aug-19 at 06:33

            I have annotated the images in labelImg tool and got the annotation in XML form. I need to convert this in LabelMe JSON format with imageData encoded in it.

            Sample Input:

            sample XML:

            ...

            ANSWER

            Answered 2020-Jul-23 at 19:05

            This is how I solved it.

            Step 1: XML to CSV format

            Source https://stackoverflow.com/questions/63061428

            QUESTION

            Get Array with json without _chartjs: {…}, push: ƒ, pop: ƒ, shift: ƒ, splice: ƒ, …]
            Asked 2020-Jun-19 at 15:04

            I have a problem to load chartjs. I need get an array like : ["5000", "14000", "10000"]

            but, I get: ["5000", "14000", "10000", _chartjs: {…}, push: ƒ, pop: ƒ, shift: ƒ, splice: ƒ, …]

            This is my ajax response :

            ...

            ANSWER

            Answered 2020-Jun-19 at 15:04

            I only remove the global array and I declare the array into function, problem resolved.

            Source https://stackoverflow.com/questions/62374196

            QUESTION

            To convert a batch Labelme json files to a set of images and labels using anaconda prompt
            Asked 2020-May-04 at 01:28

            I have a dataset of image masks that were generated by the Labelme tool as JSON files and on the Github tutorial (https://github.com/wkentaro/labelme/tree/master/examples/tutorial) it shows to change the JSON file into an image file we use the following command line code

            ...

            ANSWER

            Answered 2020-May-04 at 01:28

            Use the command FOR /? to read about substitution of FOR variable references on the last page of the help output. To get just the file basename, %%~na can be used. Run this without ECHO OFF so that you can see each command.

            Source https://stackoverflow.com/questions/61537887

            QUESTION

            Torchvision transforms.toPILImage() TypeError: function takes exactly 1 argument (3 given)
            Asked 2020-Apr-01 at 14:47

            From Anaconda pillow -> 7.00 torchvision -> 0.5.0

            I installed the latest Anaconda for Linux( Anaconda3-2020.02-Linux-x86_64.sh) today and I run the following commands,

            ...

            ANSWER

            Answered 2020-Apr-01 at 14:47

            The error comes when transform RandomRotation is invoked and a new instance of Image class is created. Particularly, function core.fill() at line 2544 return im._new( core.fill(mode, size, color)) in function new, in file anaconda3/envs/py36/lib/python3.6/site-packages/PIL/Image.py is the source of 'evil'.

            core is the alias of file anaconda3/envs/py36/lib/python3.6/site-packages/PIL/_imaging.cpython-36m-x86_64-linux-gnu.so when imported as from . import _imaging as core at line 69 in the same file( Image.py).

            Function core.fill(mode, size, color)) depending on the mode has different expectations about color. color is always a 3 - tuple, lines 726 - 727 in file anaconda3/envs/py36/lib/python3.6/site-packages/torchvision/transforms/functional.py, function rotate i.e. RandomRotation transform.

            If mode == RGB everything is fine. If mode == L then TypeError: function takes exactly 1 argument (3 given) is raised. If mode == F, TypeError: must be real number, not tuple is raised. I found that given my images under transformation.

            For mode in [ 'L', 'F'], parameter color needs to be a single integer. For other modes that might be also true.

            Thus, I solved my problem by updating the code as,

            Source https://stackoverflow.com/questions/60958127

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install labelme

            Platform agnostic installation: Anaconda, Docker
            Platform specific installation: Ubuntu, macOS, Windows
            Pre-build binaries from the release section
            Below shows how to build the standalone executable on macOS, Linux and Windows.

            Support

            Make sure below test passes on your environment. See .github/workflows/ci.yml for more detail.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install labelme

          • CLONE
          • HTTPS

            https://github.com/wkentaro/labelme.git

          • CLI

            gh repo clone wkentaro/labelme

          • sshUrl

            git@github.com:wkentaro/labelme.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link