Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
fd7b9de
adding demo button
mmgallai Jun 7, 2024
da026af
Merge branch 'code-review'
jagruthreddy Jun 12, 2024
f52eb07
Solved error
jagruthreddy Jun 12, 2024
2d0285b
Small test change
jagruthreddy Jun 12, 2024
2a94b86
Adjustments.
jagruthreddy Jun 12, 2024
0d6320c
Rename to test_Manual.py
jagruthreddy Jun 12, 2024
b83243a
Delete view/__pycache__ directory
jagruthreddy Jun 12, 2024
0743c71
Delete controller/__pycache__ directory
jagruthreddy Jun 12, 2024
7db57ad
Delete icons/Original directory
jagruthreddy Jun 12, 2024
35bcb79
Little adjustment to code
jagruthreddy Jun 12, 2024
439b0e5
Small but no error test
jagruthreddy Jun 12, 2024
cb16f6f
Final change
jagruthreddy Jun 12, 2024
081e42f
Delete
jagruthreddy Jun 12, 2024
6540f36
Included requirements
jagruthreddy Jun 12, 2024
320ed2b
Not needed.
jagruthreddy Jun 12, 2024
d6eedd1
Update README.md
jagruthreddy Jun 12, 2024
b3e8d9b
Update README.md
jagruthreddy Jun 12, 2024
3d06d28
Table of Contents
jagruthreddy Jun 12, 2024
216da74
Implemenetd Album renaming
nagatharun Jun 13, 2024
013226e
Updated delete view and functionality.
jagruthreddy Jun 14, 2024
9f5897a
Merge pull request #4 from mmgallai/story11
jagruthreddy Jun 14, 2024
8f854ca
Merge branch 'main' of https://github.com/mmgallai/VisionAI into story17
jagruthreddy Jun 15, 2024
c60a187
Added right click delete functionaliy, better delete design, single c…
jagruthreddy Jun 15, 2024
091e99a
Merge pull request #5 from mmgallai/story17
nagatharun Jun 16, 2024
b8abae8
Added test case for sorting folders and images
Abduraziq Jun 16, 2024
c352274
Updated est_sort_button.py with additional test cases
Abduraziq Jun 16, 2024
95dac13
Minor
jagruthreddy Jun 16, 2024
aff9d89
fixing image processing method, handling dimension miss-match
mmgallai Jun 16, 2024
f675709
adjustments to test cases
mmgallai Jun 17, 2024
89b7b49
adding circle-ci and dockerfile
mmgallai Jun 17, 2024
1a755d2
editing requirements file, circle-ciand docker
mmgallai Jun 17, 2024
996ae4f
test
mmgallai Jun 17, 2024
7547020
removing pytest
mmgallai Jun 17, 2024
b76a57c
editing dockerfile and circle ci to include x11 lib
mmgallai Jun 17, 2024
e2c416f
editing dockerfile to inclide dependencies
mmgallai Jun 17, 2024
6c84969
editing circle ci, to run tests one by one
mmgallai Jun 17, 2024
8156e75
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
9c2b1be
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
aa8495a
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
cc198ad
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
7d9c268
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
596a7e6
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
de32f1f
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
e800430
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
0277520
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
4172f0d
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
f3ee0f4
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
725a0bb
editing dockerfile to include dependencies
mmgallai Jun 17, 2024
7510057
editing docker file
mmgallai Jun 17, 2024
92538d8
editing docker file
mmgallai Jun 17, 2024
b3faaab
editing docker file
mmgallai Jun 17, 2024
fbf1e55
editing docker file
mmgallai Jun 17, 2024
422457f
editing the docker file
mmgallai Jun 17, 2024
352af13
editing the docker file
mmgallai Jun 17, 2024
a3fed3b
editing the docker file
mmgallai Jun 17, 2024
45537db
editing the docker file
mmgallai Jun 17, 2024
4b82f04
editing the docker file
mmgallai Jun 17, 2024
fcc8f6c
editing the docker file
mmgallai Jun 17, 2024
eea473b
editing the docker file
mmgallai Jun 17, 2024
3193636
editing the docker file
mmgallai Jun 17, 2024
64f4a8f
editing the docker file
mmgallai Jun 17, 2024
499bc3e
editing the docker file
mmgallai Jun 17, 2024
4d76ca8
editing the docker file
mmgallai Jun 17, 2024
fd642b3
editing the docker file
mmgallai Jun 17, 2024
7a4357b
editing the docker file
mmgallai Jun 17, 2024
410184e
editing the docker file
mmgallai Jun 17, 2024
bf6dceb
editing the docker file
mmgallai Jun 17, 2024
92bccf9
editing the docker file
mmgallai Jun 17, 2024
097a4d1
editing the docker file
mmgallai Jun 17, 2024
c321ced
editing the docker file
mmgallai Jun 18, 2024
191beb8
editing the docker file
mmgallai Jun 18, 2024
b1e5529
editing the docker file
mmgallai Jun 18, 2024
ac1f857
editing the docker file
mmgallai Jun 18, 2024
785f06c
editing the docker file
mmgallai Jun 18, 2024
cadf05c
editing the docker file
mmgallai Jun 18, 2024
a3e632e
editing the docker file
mmgallai Jun 18, 2024
d8af263
editing the docker file
mmgallai Jun 18, 2024
8236be6
Minor
jagruthreddy Jun 18, 2024
54219d9
Update Dockerfile
jagruthreddy Jun 18, 2024
43be8ad
Major
jagruthreddy Jun 18, 2024
aea83c6
Dockerfile
jagruthreddy Jun 18, 2024
d4d4eef
modified: requirements.txt
jagruthreddy Jun 18, 2024
21db991
modified: Dockerfile
jagruthreddy Jun 18, 2024
e38d3ab
Dockerfile
jagruthreddy Jun 18, 2024
5881c3f
Dockerfile
jagruthreddy Jun 18, 2024
231bab4
Dockerfile
jagruthreddy Jun 18, 2024
23d1435
Docker and req
jagruthreddy Jun 18, 2024
ead11c2
config
jagruthreddy Jun 18, 2024
a722722
.circleci
jagruthreddy Jun 18, 2024
c8a2b0d
Dockerfile
jagruthreddy Jun 18, 2024
b9321b6
Dockerfile
jagruthreddy Jun 18, 2024
4539d26
Dockerfile
jagruthreddy Jun 18, 2024
274fc2f
Dockerfile
jagruthreddy Jun 18, 2024
913d9fb
modified: .circleci/config.yml, Dockerfile
jagruthreddy Jun 18, 2024
c65a27a
editing docker file
mmgallai Jun 18, 2024
9745ca1
editing docker file
mmgallai Jun 18, 2024
3cc32a5
editing docker file
mmgallai Jun 18, 2024
2ed7ac7
editing docker file
mmgallai Jun 18, 2024
93a7586
editing docker file
mmgallai Jun 18, 2024
c0c39e6
editing docker file
mmgallai Jun 18, 2024
526feff
editing docker file
mmgallai Jun 18, 2024
8f256fb
editing docker file
mmgallai Jun 18, 2024
3a13ecb
Update README.md
jagruthreddy Jun 18, 2024
d77fe53
Updated requirements.txt
Abduraziq Jun 18, 2024
2703b88
README.md
Abduraziq Jun 18, 2024
efaffc8
Update README.md
jagruthreddy Jun 18, 2024
259392f
nagatharun Jun 18, 2024
012d3bf
modified .circleci/config.yml file, Dockerfile
nagatharun Jun 18, 2024
6b4bc1a
Update config.yml
mmgallai Jun 18, 2024
ce9d59f
Update app.py
mmgallai Jun 18, 2024
f0ed56f
Update Dockerfile
mmgallai Jun 18, 2024
4bc87bf
Create environment.yml
mmgallai Jun 18, 2024
7f294ee
Updated README.md
nagatharun Jun 18, 2024
8c50d80
edit
mmgallai Jun 18, 2024
acbd159
edit
mmgallai Jun 18, 2024
7020476
Updated config.yml
nagatharun Jun 18, 2024
01600e1
edit
mmgallai Jun 18, 2024
ec5a5bd
Merge branch 'main' of https://github.com/mmgallai/VisionAI
mmgallai Jun 18, 2024
8bcbcdc
test
mmgallai Jun 18, 2024
89a37cf
test
mmgallai Jun 18, 2024
b9abd02
Update app.py
mmgallai Jun 18, 2024
6320559
updated config.yml
nagatharun Jun 18, 2024
dcd0d93
Merge branch 'main' of https://github.com/mmgallai/VisionAI
nagatharun Jun 18, 2024
456ddf5
updated config.yml
nagatharun Jun 18, 2024
5133182
Update app.py
mmgallai Jun 18, 2024
26e613c
Update app.py
mmgallai Jun 18, 2024
48e4786
Update config.yml
nagatharun Jun 18, 2024
e408d38
Update requirements.txt
nagatharun Jun 18, 2024
8c64084
Update README.md
jagruthreddy Jun 18, 2024
d162566
test
mmgallai Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# version: 2.1

# executors:
# docker-executor:
# docker:
# - image: docker:20.10.7

# jobs:
# build_and_push:
# executor: docker-executor
# steps:
# # Set up Docker environment for building images
# - setup_remote_docker:
# version: 20.10.7

# # Check out the code from the repository
# - checkout

# # Build the Docker image
# - run:
# name: Build Docker image
# #command: docker build -t mgallai/vision_ai:${CIRCLE_SHA1} .
# command: docker build -t $DOCKER_USER/vision_ai:${CIRCLE_SHA1} .


# # Log in to Docker Hub using credentials stored in CircleCI environment variables
# - run:
# name: Log in to Docker Hub
# command: echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin

# # Push Docker image
# - run:
# name: Push Docker image
# command: docker push $DOCKER_USER/vision_ai:${CIRCLE_SHA1}

# workflows:
# version: 2
# build_and_push:
# jobs:
# - build_and_push:
# filters:
# branches:
# only:
# - main

version: 2.1

executors:
python-executor:
docker:
- image: circleci/python:3.10
environment:
DISPLAY: :99

docker-executor:
docker:
- image: docker:20.10.7

jobs:

build-and-test:
executor: python-executor
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo apt-get update
sudo apt-get install -y xvfb libxi-dev libxtst-dev xdotool
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-qt
pip install pytest pytest-qt PyQt5
pip install pytest pytest-xvfb pyautogui
- run:
name: Setup PYTHONPATH
command: |
export PYTHONPATH="$PYTHONPATH:/home/circleci/project"
- run:
name: Run tests
command: |
. venv/bin/activate
xvfb-run -a pytest tests/test_AI_NumberOfOutputs.py -v
xvfb-run -a pytest tests/test_AI_PredictedCity.py -v
xvfb-run -a pytest tests/test_AI_Preprocessing.py -v
xvfb-run -a pytest tests/test_ButtonPanel.py -v
xvfb-run -a pytest tests/test_IconsExist.py -v
xvfb-run -a pytest tests/test_InformationDialog.py -v
xvfb-run -a pytest tests/test_ModelExist.py -v
xvfb-run -a pytest tests/test_SelectMethod.py -v
xvfb-run -a pytest tests/test_sort_button.py -v
- persist_to_workspace:
root: .
paths:
- ./*

build-and-push:
executor: docker-executor
steps:
- checkout
- setup_remote_docker:
version: 20.10.7
- attach_workspace:
at: .
- run:
name: Build Docker image
command: docker build -t $DOCKER_USER/vision_ai:${CIRCLE_SHA1} .
- run:
name: Log in to Docker Hub
command: echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
- run:
name: Push Docker image
command: docker push $DOCKER_USER/vision_ai:${CIRCLE_SHA1}

workflows:
version: 2
build-test-and-push:
jobs:
- build-and-test
- build-and-push:
requires:
- build-and-test
filters:
branches:
only:
- main
64 changes: 64 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Use a specific version of Miniconda as the base image
FROM continuumio/miniconda3:4.9.2

# Set the working directory in the container
WORKDIR /app

# Update repository information and install necessary system libraries and Xvfb
RUN apt-get update --allow-releaseinfo-change && \
apt-get install -y --no-install-recommends apt-utils && \
sed -i 's|http://deb.debian.org/debian buster|http://deb.debian.org/debian oldoldstable|g' /etc/apt/sources.list && \
sed -i 's|http://security.debian.org/debian-security buster/updates|http://security.debian.org/debian-security oldoldstable/updates|g' /etc/apt/sources.list && \
apt-get update --allow-releaseinfo-change && \
apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libxkbcommon-x11-0 \
libxcb-glx0 \
libxcb-keysyms1 \
libx11-xcb1 \
libxrender1 \
libfontconfig1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxtst6 \
libxi6 \
libxrandr2 \
libxss1 \
libxshmfence1 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-shm0 \
libxcb-util0 \
libxcb-xfixes0 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-xinerama0 \
xvfb && \
rm -rf /var/lib/apt/lists/*

# Set environment variables for Qt
ENV QT_XCB_GL_INTEGRATION=none
ENV QT_DEBUG_PLUGINS=1

# Copy the environment configuration file
COPY environment.yml .

# Create the Conda environment specified in environment.yml
RUN conda env create -f environment.yml

# Install onnxruntime via pip
RUN conda run -n myenv pip install onnxruntime==1.8.0

# Make sure the environment is activated by default
SHELL ["conda", "run", "-n", "myenv", "/bin/bash", "-c"]

# Copy the rest of the application code into the container
COPY . .

# Define environment variable
ENV NAME World

# Start Xvfb and run the application when the container launches
CMD ["bash", "-c", "xvfb-run -a python app.py"]
185 changes: 184 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,185 @@
# VisionAI
Image Classification Software

![VisionAI Logo](https://i.ibb.co/sq5J35B/Screenshot-2024-06-12-094922.png)

VisionAI is a PyQt5-based desktop application for organizing image collections using Vision AI and manual tools. Users can select folders, navigate history, sort folders, view individual images, open subfolders, and delete unwanted folders. VisionAI leverages AI to analyze and categorize images, enhancing the manual organization process and making it efficient to manage large image collections.

## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Testing](#testing)
- [Datasets](#datasets)
- [Project Structure](#project-structure)
- [Demo](#demo)
- [Burndown Chart](#burndown-chart)
- [Technologies Used](#technologies-used)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgements](#acknowledgements)

## Features

- **Select Folder:** Choose a directory to display its contents.
- **Navigate History:** Use back and forward buttons to navigate through folder history.
- **Sort Folders:** Sort folders by the number of images they contain.
- **View Images:** Double-click to view single images.
- **Open Folder:** Double-click to open any displayed folder.
- **Vision AI:** Automatically create albums for folders using Vision AI.
- **Manual Classification:** Manually create albums for selected images.
- **Web Demo:** View a web demo hosted on Hugging Face.
- **Rename Folder:** Rename an album folder with confirmation.
- **Delete Folder:** Delete an album folder with confirmation.
- **Information Dialog:** View instructions and information about the application.

## Installation

1. **Clone the repository:**
```
git clone https://github.com/mmgallai/VisionAI.git
cd VisionAI
```

2. **Create and activate a virtual environment:**
```
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```

3. **Install dependencies:**
```
pip install -r requirements.txt
```

4. **Install PyQt5:**
```
pip install PyQt5
```

5. **Install pytest and pytest-qt for testing:**
```
pip install pytest pytest-qt
```

## Usage

1. **Run the application:**
```
python app.py
```

2. **Interact with the UI:**
- Use the buttons to navigate, sort, and select folders.
- Double-click on images to view them.
- Use the "Vision AI" and "Manual" buttons to organize images.
- Use the "Delete" button to remove folders.

## Testing

1. **Run the tests:**
```
pytest tests/
```

## Datasets
1. **Link to Dataset :** [Subset of parent](https://drive.google.com/drive/folders/1Drk4mrMexkMgB0lk4JvJPYrQYq1OvzFL)
2. **Link to Parent Dataset :** [Parent dataset](https://www.kaggle.com/datasets/amaralibey/gsv-cities/data)

## Project Structure

```
VisionAI/
├── controller/
│ ├── AI.py
│ └── Manual.py
├── view/
│ ├── ButtonPanel.py
│ ├── ButtonStyle.py
│ ├── CloseConfirmationDialog.py
│ ├── DemoButton.py
│ ├── FolderList.py
│ ├── FrameSettings.py
│ ├── HistoryManager.py
│ ├── ImageDisplay.py
│ ├── InformationDialog.py
│ ├── InitialFolderSelection.py
│ ├── MainView.py
│ ├── UploadButton.py
│ └── SelectMethod.py
├── tests/
│ ├── __init__.py
│ ├── test_AI_NumberOfOutputs.py
│ ├── test_AI_PredictedCity.py
│ ├── test_AI_Preprocessing.py
│ ├── test_ButtonPanel.py
│ ├── test_Delete_FolderList.py
│ ├── test_IconsExist.py
│ ├── test_ImageCount.py
│ ├── test_InformationDialog.py
│ ├── test_Manual.py
│ ├── test_ModelExist.py
│ ├── test_SelectMethod.py
│ └── test_WebDemo.py
├── test images/
│ ├── image1.jpg
│ ├── image2.jpg
│ ├── image3.jpg
│ ├── image4.jpg
│ ├── image5.jpg
│ ├── image6.jpg
│ ├── image7.jpg
│ ├── image8.jpg
│ ├── image9.jpg
│ ├── image10.jpg
│ └── names.txt
├── icons/
│ ├── back_icon.png
│ ├── delete_icon.png
│ ├── directories_icon.png
│ ├── folder_icon.png
│ ├── forward_icon.png
│ ├── image_icon.png
│ ├── info_icon.png
│ ├── method_icon.png
│ └── sort_icon.png
├── model/
│ └── best.onnx
├── app.py
├── requirements.txt
└── README.md

```
- app.py: The main entry point for the application.

## Demo
![Demo](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZHAydWU3MnE5dnZ4Njg4eXdzYnBkZDgwMzJnemw0Z3Z0azl1MmN0MCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Y5rMvrTf8JABxYHAPh/giphy.gif)

## Burndown Chart
**Sprint 2:**
![Burndown Chart 2](https://i.ibb.co/9TLgm7g/Sprint-burndown.png)
**Sprint 3:**
![Burndown Chart 3](https://i.ibb.co/gJ35qW9/Screenshot-2024-06-18-114417.png)

## Technologies Used
- <img src="https://img.icons8.com/color/48/000000/python.png" alt="Python" width="48" height="48"> **Python**: The primary programming language used for this project.
- <img src="https://upload.wikimedia.org/wikipedia/commons/e/e6/Python_and_Qt.svg" alt="PyQt5" width="48" height="48"> **PyQt5**: Used for creating the graphical user interface.
- <img src="https://upload.wikimedia.org/wikipedia/commons/1/17/Open_Neural_Network_Exchange_logo.svg" alt="ONNX" width="48" height="48"> **ONNX**: Used for the machine learning models.
- <img src="https://upload.wikimedia.org/wikipedia/commons/b/ba/Pytest_logo.svg" alt="pytest" width="48" height="48"> **pytest**: Used for testing the application.
- <img src="https://img.icons8.com/fluent/48/000000/github.png" alt="GitHub" width="48" height="48"> **GitHub**: For version control and collaboration.


## Contributing

Contributions are welcome! Please create an issue or submit a pull request for any improvements or bug fixes.

## License

This project is licensed under the MIT License.

## Acknowledgements

- This project uses PyQt5 for the graphical user interface.
- This project uses [YOLOv8](https://github.com/ultralytics/ultralytics) to organize images.
- Special thanks to user "[amaralibey](https://www.kaggle.com/amaralibey)" in kaggle for the datatset.
- Special thanks to the contributors and the open-source community for their support.

Loading