Skip to content

Commit 1cab489

Browse files
committed
pip package setup files
version is not hard coded in version dialog
1 parent 22334e9 commit 1cab489

File tree

6 files changed

+70
-17
lines changed

6 files changed

+70
-17
lines changed

DLTA_AI_app/labelme/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# 1. MAJOR version when you make incompatible API changes;
1313
# 2. MINOR version when you add functionality in a backwards-compatible manner;
1414
# 3. PATCH version when you make backwards-compatible bug fixes.
15-
__version__ = "4.5.10"
15+
__version__ = "1.0.1"
1616

1717
QT4 = QT_VERSION[0] == "4"
1818
QT5 = QT_VERSION[0] == "5"

DLTA_AI_app/labelme/intelligence.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
from ultralytics import YOLO
22
import json
33
import time
4-
from inferencing import models_inference
4+
try:
5+
from inferencing import models_inference
6+
except ModuleNotFoundError:
7+
import subprocess
8+
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.")
9+
subprocess.run(["mim", "install", "mmcv-full==1.7.0"])
10+
from inferencing import models_inference
511
from labelme.label_file import LabelFile
612
from labelme import PY2
713
from qtpy import QtCore

DLTA_AI_app/labelme/utils/help.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,5 +412,6 @@ def version():
412412
Returns:
413413
None
414414
"""
415+
from labelme import __version__
415416
# Display the version number in a message box
416-
OKmsgBox("Version", "DLTA-AI Version 1.0")
417+
OKmsgBox("Version", f"DLTA-AI Version {__version__}")

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include . *

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align = "center">
22
<h1>
3-
<img src = "assets/icon.png" width = 200 height = 200>
3+
<img src = "https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/icon.png?raw=true" width = 200 height = 200>
44
<br>
55

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

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

2424
<!-- make p with larger font size -->
2525
[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-) 📜
@@ -28,23 +28,32 @@ DLTA-AI is the next generation of annotation tools, integrating the power of Com
2828

2929

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

34+
install pytorch according to your device from [here](https://pytorch.org/get-started/locally/)
3535
```
36-
conda create --name DLTA-AI python=3.8 -y
36+
conda create -n DLTA-AI python=3.8
3737
conda activate DLTA-AI
3838
3939
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
4040
```
41-
## 2. install requirements
41+
## Option 1: using pip
42+
```
43+
pip install DLTA-AI
44+
```
45+
note that first time running the tool, it will download a required module, it may take some time
46+
47+
## Option 2: manual installation
48+
after downloading the lastest [release](https://github.com/0ssamaak0/DLTA-AI/releases)
49+
50+
install requirements
4251

4352
```
4453
pip install -r requirements.txt
4554
mim install mmcv-full==1.7.0
4655
```
47-
###3. Running
56+
then
4857
Run the tool from `DLTA_AI_app` directory
4958
```
5059
cd labelme-master
@@ -91,7 +100,7 @@ DLTA-AI takes the Annotation to the next level by integrating lastest Meta model
91100

92101
<div align = "center">
93102

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

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

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

106115

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

111120
<div align = "center">
112121

113-
![Segmentation](assets/segmentation.png)
122+
![Segmentation](https://github.com/0ssamaak0/DLTA-AI/blob/master/assets/segmentation.png?raw=true)
114123
</div>
115124
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
116125

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

124133
<div align = "center">
125134

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

128137
</div>
129138

130139
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
131140

132141
<div align = "center">
133142

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

137146
# Export 📤
138147
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.
139148

140149
<div align = "center">
141150

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

144153
</div>
145154

setup.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import setuptools
2+
3+
with open("README.md", "r", encoding="utf8") as fh:
4+
long_description = fh.read()
5+
6+
with open("requirements.txt", "r") as f:
7+
requirements = f.read().splitlines()
8+
9+
__version__ = "0.0.0"
10+
with open("DLTA_AI_app/labelme/__init__.py", "r") as f:
11+
for line in f.readlines():
12+
if line.startswith("__version__"):
13+
__version__ = line.split("=")[1].strip().strip('"')
14+
break
15+
16+
setuptools.setup(
17+
name="DLTA-AI",
18+
version=f"{__version__}",
19+
author="0ssamaak0",
20+
author_email="0ssamaak0@gmail.com",
21+
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",
22+
long_description=long_description,
23+
long_description_content_type="text/markdown",
24+
url="https://github.com/0ssamaak0/DLTA-AI",
25+
package_dir={"DLTA_AI_app": "DLTA_AI_app"},
26+
python_requires='>=3.8',
27+
install_requires=requirements,
28+
package_data={"": ["*"]},
29+
license="GPLv3",
30+
entry_points={
31+
"console_scripts": [
32+
"DLTA-AI=DLTA_AI_app.__main__:main"
33+
]
34+
}
35+
)
36+

0 commit comments

Comments
 (0)