Skip to content

Commit

Permalink
pip package setup files
Browse files Browse the repository at this point in the history
version is not hard coded in version dialog
  • Loading branch information
0ssamaak0 committed May 28, 2023
1 parent 22334e9 commit 1cab489
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DLTA_AI_app/labelme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 1. MAJOR version when you make incompatible API changes;
# 2. MINOR version when you add functionality in a backwards-compatible manner;
# 3. PATCH version when you make backwards-compatible bug fixes.
__version__ = "4.5.10"
__version__ = "1.0.1"

QT4 = QT_VERSION[0] == "4"
QT5 = QT_VERSION[0] == "5"
Expand Down
8 changes: 7 additions & 1 deletion DLTA_AI_app/labelme/intelligence.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from ultralytics import YOLO
import json
import time
from inferencing import models_inference
try:
from inferencing import models_inference
except ModuleNotFoundError:
import subprocess
print("The required package 'mmcv-full' is not currently installed. It will now be installed. This process may take some time. Note that this package will only be installed the first time you use DLTA-AI.")
subprocess.run(["mim", "install", "mmcv-full==1.7.0"])
from inferencing import models_inference
from labelme.label_file import LabelFile
from labelme import PY2
from qtpy import QtCore
Expand Down
3 changes: 2 additions & 1 deletion DLTA_AI_app/labelme/utils/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,6 @@ def version():
Returns:
None
"""
from labelme import __version__
# Display the version number in a message box
OKmsgBox("Version", "DLTA-AI Version 1.0")
OKmsgBox("Version", f"DLTA-AI Version {__version__}")
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include . *
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align = "center">
<h1>
<img src = "assets/icon.png" width = 200 height = 200>
<img src = "https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/icon.png?raw=true" width = 200 height = 200>
<br>

</h1>
Expand All @@ -19,7 +19,7 @@ DLTA-AI is the next generation of annotation tools, integrating the power of Com
[![GitHub issues](https://img.shields.io/github/issues/0ssamaak0/DLTA-AI)](https://github.com/0ssamaak0/DLTA-AI/issues)
[![GitHub last commit](https://img.shields.io/github/last-commit/0ssamaak0/DLTA-AI)](https://github.com/0ssamaak0/DLTA-AI/commits)

![gif_main](assets/gif_main.gif)
![gif_main](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/gif_main.gif?raw=true)

<!-- make p with larger font size -->
[Installation](#installation-%EF%B8%8F) 🛠️ | [Segment Anything](#Segment-Anything-) 🪄 | [Model Selection](#model-selection-) 🤖 | [Segmentation](#segmentation-) 🎨 | [Object Tracking](#object-tracking-) 🚗 | [Export](#export-) 📤 | [Other Features](#other-features-) 🌟| [Contributing](#contributing-) 🤝| [Acknowledgements](#acknowledgements-)🙏| [Resources](#resources-) 🌐 | [License](#license-) 📜
Expand All @@ -28,23 +28,32 @@ DLTA-AI is the next generation of annotation tools, integrating the power of Com


# Installation 🛠️
after downloading the lastest [release](https://github.com/0ssamaak0/DLTA-AI/releases) or cloning the repoistory, do the following steps
## 1. Install [Pytorch](https://pytorch.org/)
preferably using anaconda
## Install Pytorch
preferably in a conda environment with python 3.8

install pytorch according to your device from [here](https://pytorch.org/get-started/locally/)
```
conda create --name DLTA-AI python=3.8 -y
conda create -n DLTA-AI python=3.8
conda activate DLTA-AI
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
```
## 2. install requirements
## Option 1: using pip
```
pip install DLTA-AI
```
note that first time running the tool, it will download a required module, it may take some time

## Option 2: manual installation
after downloading the lastest [release](https://github.com/0ssamaak0/DLTA-AI/releases)

install requirements

```
pip install -r requirements.txt
mim install mmcv-full==1.7.0
```
###3. Running
then
Run the tool from `DLTA_AI_app` directory
```
cd labelme-master
Expand Down Expand Up @@ -91,7 +100,7 @@ DLTA-AI takes the Annotation to the next level by integrating lastest Meta model

<div align = "center">

![Segment Anything](assets/SAM.gif)
![Segment Anything](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/SAM.gif?raw=true)
</div>

# Model Selection 🤖
Expand All @@ -100,7 +109,7 @@ For model selection, DLTA-AI provides the **Model Explorer** to utilize the powe
the to give the user the ability to compare, download and select from the library of models
<div align = "center">

![Model Explorer](assets/model_explorer.png)
![Model Explorer](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/model_explorer.png?raw=true)
</div>


Expand All @@ -110,7 +119,7 @@ Using the models from the **Model Explorer**, DLTA-AI provides a seamless expire

<div align = "center">

![Segmentation](assets/segmentation.png)
![Segmentation](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/segmentation.png?raw=true)
</div>
and as mentioned before, **SAM** is fully integrated in DLTA-AI to provide zero-shot segmentation for any class, and to improve the quality of segmentation

Expand All @@ -123,23 +132,23 @@ Beside this, DLTA-AI provides a completely new way to modify the tracking result

<div align = "center">

![Object Tracking](assets/tracking.gif)
![Object Tracking](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/tracking.gif?raw=true)

</div>

Beside automatic tracking models, DLTA-AI provides different methods of interpolation and filling gaps between frames to fix occlusions and unpredicted behaviors in a semi-automatic way

<div align = "center">

![Interpolation](assets/interpolation.png)
![Interpolation](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/interpolation.png?raw=true)
</div>

# Export 📤
For Instance Segmentation, DLTA-AI provides to option to export the segmentation to standard COCO format, and the results of tracking to MOT format, and a video file for the tracking results with desired visualization options e.g., show id, bbox, class name, etc.

<div align = "center">

![Export](assets/Export.png)
![Export](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/Export.png?raw=true)

</div>

Expand Down
36 changes: 36 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import setuptools

with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()

with open("requirements.txt", "r") as f:
requirements = f.read().splitlines()

__version__ = "0.0.0"
with open("DLTA_AI_app/labelme/__init__.py", "r") as f:
for line in f.readlines():
if line.startswith("__version__"):
__version__ = line.split("=")[1].strip().strip('"')
break

setuptools.setup(
name="DLTA-AI",
version=f"{__version__}",
author="0ssamaak0",
author_email="[email protected]",
description="DLTA-AI is the next generation of annotation tools, integrating the power of Computer Vision SOTA models to Labelme in a seamless expirence and intuitive workflow to make creating image datasets easier than ever before",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/0ssamaak0/DLTA-AI",
package_dir={"DLTA_AI_app": "DLTA_AI_app"},
python_requires='>=3.8',
install_requires=requirements,
package_data={"": ["*"]},
license="GPLv3",
entry_points={
"console_scripts": [
"DLTA-AI=DLTA_AI_app.__main__:main"
]
}
)

0 comments on commit 1cab489

Please sign in to comment.