https://github.com/Ikomia-dev/IkomiaApi Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Ikomia-dev / IkomiaApi Public * Notifications * Fork 0 * Star 27 Python API - State-of-the-art algorithms in Computer Vision with a few lines of code. ikomia-dev.github.io/python-api-documentation/ License Apache-2.0 license 27 stars 0 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Discussions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Projects * Security * Insights Ikomia-dev/IkomiaApi This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 8 tags Code * Clone HTTPS GitHub CLI [https://github.com/I] Use Git or checkout with SVN using the web URL. [gh repo clone Ikomia] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @gdemarcq gdemarcq Update README.md ... 6f9a21f Oct 27, 2022 Update README.md 6f9a21f Git stats * 505 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time doc Fix tutorial code block Oct 19, 2022 ikomia Fix invalid logging initialization Oct 12, 2022 images Reshape API structure May 27, 2021 scripts Fix typo Jun 24, 2021 tests Add function to check installed modules (opencv, tb-nightly) Sep 20, 2022 .gitignore Update requirements Apr 8, 2022 LICENSE.md Change license to Apache 2.0 Mar 3, 2022 MANIFEST.in First try to complete wheel (with all dependencies) Jul 23, 2021 README.md Update README.md Oct 27, 2022 pyproject.toml Preparing package deployment May 28, 2021 setup.cfg Try removing pycocotools dependency Sep 27, 2022 setup.py Enhance package deployment Jun 2, 2021 View code [ ] Ikomia API About The Project Getting Started Installation Usage Examples Documentation License They like us, we love them Citing Ikomia Support Contact README.md Stars Website GitHub GitHub tags Logo Ikomia API Computer Vision, quick and simple ! Explore the docs >> Report Bug * Request Feature * Ask a question About The Project Ikomia API is an open source tool to build and deploy Computer Vision workflows quickly without much effort. You can mix your preferred frameworks such as OpenCV, Detectron2, OpenMMLab or YOLO with the best state-of-the-art algorithms from individual repositories. No effort, just choose what you want and Ikomia downloads it, installs the requirements and run everything in a few lines of code. [198096536-] Getting Started Installation You simply install Ikomia API via pip for Linux and Windows : pip install ikomia Note: we provide Python wheel for Python 3.7, 3.8 and 3.9. For Linux users, the wheel targets the platform manylinux2014 so that it should be compatible with most of recent distributions. For Windows, the wheel is only compatible with Windows 10. Usage Ikomia API has already more than 180 pre-integrated algorithms (mainly OpenCV) but the most interesting algorithms are in Ikomia HUB . That's why, you need to connect to Ikomia HUB when you want to download/install these algorithms. To get your credentials, you can join our community here :) Ikomia authentication is based on two environment variables: IKOMIA_USER=your_login and IKOMIA_PWD=your_password, so you can set these variables by command-lines or use this snippet code: import ikomia import os os.environ['IKOMIA_USER'] = "your_login" os.environ['IKOMIA_PWD'] = "your_password" ikomia.authenticate() Once you have downloaded and installed what you want, you don't need to connect again unless you want to try an other algorithm. All that said, Ikomia API is built around a workflow system (think of an oriented graph). Each node is an algorithm and each edge is an input/output such as images, videos, graphics, measures and so on. When you want to use an algorithm, it's always the same code pattern which is useful when you want to test multiple algorithms effortlessly. For convenience, We provide an auto-completion mechanism proposing available algorithms while coding (for built-in and installed algorithms only). It is available under the ik namespace. from ikomia.dataprocess import workflow from ikomia.utils import ik # Init your workflow wf = workflow.create("YOLO inference") # Add YOLO and connect it to your input data # The same code for every YOLO algorithms !! # yolo_id, yolo = wf.add_task(ik.infer_yolo_v3) # yolo_id, yolo = wf.add_task(ik.infer_yolo_v4) # yolo_id, yolo = wf.add_task(ik.infer_yolo_v5) yolo_id, yolo = wf.add_task(ik.infer_yolo_v7) wf.connect_tasks(wf.getRootID(), yolo_id) # Run directly on your image wf.run_on(path="path/to/your/image.png") If you want to display your results, you can easily display what you want. import cv2 # YOLO output image with bounding boxes img_bbox = wf.get_image_with_graphics(yolo_id) img_bbox = cv2.cvtColor(img_bbox, cv2.COLOR_RGB2BGR) cv2.imshow(img_bbox) [img_foot] [img_foot_bbox] You can also change each algorithms parameters. yolo_params = { ik.infer_yolo_v7_param.custom_train: True, ik.infer_yolo_v7_param.custom_model: "path/to/your/model", ik.infer_yolo_v7_param.thr_conf: 0.25 } wf.set_parameters(task_id=yolo_id, params=yolo_params) If you don't know what are the parameters (which is often the case), just print your task ! print(yolo) Show print ################################### # infer_yolo_v7 ################################### *********************************** * PARAMETERS *********************************** cuda:True thr_conf:0.25 iou_conf:0.5 pretrain_model:yolov7 custom_model: img_size:640 custom_train:False *********************************** * INPUTS *********************************** ----------------------------------- Name: porsche-4795517_960_720 ----------------------------------- Description: 2D or 3D images. Can be single frame from video or camera stream. Save folder: Auto-save: 0 Data type: image Save format: .png Dimension count: 2 File name: ----------------------------------- Name: CGraphicsInput ----------------------------------- Description: Graphics items organized in layer. Represent shapes and types of objects in image. Graphics can be created interactively by user. Save folder: Auto-save: 0 Data type: graphics Save format: .json Dimension count: 0 *********************************** * OUTPUTS *********************************** ----------------------------------- Name: CImageIO ----------------------------------- Description: 2D or 3D images. Can be single frame from video or camera stream. Save folder: Auto-save: 0 Data type: image Save format: .png Dimension count: 2 File name: ----------------------------------- Name: CObjectDetectionIO ----------------------------------- Description: Object detection data: label, confidence, box and color. Save folder: Auto-save: 0 Data type: Object detection Save format: .json Dimension count: 0 Then you can easily save your workflow as JSON file for reuse. wf.save("path/to/your/workflow.json") wf.load("path/to/your/workflow.json") wf.run_on("path/to/your/image.png") And finally, you can also export your results as JSON files. # Get all object detection outputs (most of the time, there is only one) output_list = wf.get_object_detection_output(task_name=ik.infer_yolo_v7) output_list[0].toJson() '{"detections":[{"box":{"height":195,"width":463,"x":183,"y":261},"color":{"a":0,"b":192,"g":106,"r":91},"confidence":0.90673828125,"id":0,"label":"car"}]}' Examples You can find some notebooks here. We provide some Google Colab tutorials: Notebooks Google Colab How to make a simple workflow Open In Colab How to run Neural Style Transfer Open In Colab How to train and run YOLO v7 on your datasets Open In Colab How to use Detectron2 Object Detection Open In Colab Documentation Python API documentation can be found here. You will find Ikomia HUB algorithms code source in our Ikomia HUB GitHub. License Distributed under the Apache-2.0 License. See LICENSE.md for more information. They like us, we love them Stargazers repo roster for @Ikomia-dev/IkomiaApi Citing Ikomia If you use Ikomia in your research, please use the following BibTeX entry. @misc{DeBa2019Ikomia, author = {Guillaume Demarcq and Ludovic Barusseau}, title = {Ikomia}, howpublished = {\url{https://github.com/Ikomia-dev/IkomiaAPI}}, year = {2019} } Support Contributions, issues, and feature requests are welcome! Give a if you like this project! Contact Ikomia - @IkomiaOfficial - team@ikomia.com Project Link: https://github.com/Ikomia-dev/IkomiaAPI About Python API - State-of-the-art algorithms in Computer Vision with a few lines of code. ikomia-dev.github.io/python-api-documentation/ Topics python opencv computer-vision deep-learning tensorflow image-processing pytorch computervision detectron2 openmmlab Resources Readme License Apache-2.0 license Stars 27 stars Watchers 1 watching Forks 0 forks Releases 8 tags Contributors 2 * @LudoBar LudoBar Ludovic Barusseau * @gdemarcq gdemarcq Languages * Python 95.8% * Jupyter Notebook 4.2% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.