diff --git a/.github/workflows/python_environment.yml b/.github/workflows/python_environment.yml deleted file mode 100644 index 7782d4a..0000000 --- a/.github/workflows/python_environment.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Python Environment - -on: - push: - branches: [ main ] - paths: - - 'Controller/**' - - 'Training_Process/**' - - '.github/workflows/python_environment.yml' - pull_request: - branches: [ main ] - paths: - - 'Controller/**' - - 'Training_Process/**' - - '.github/workflows/python_environment.yml' - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] - exclude: - - os: macos-latest - python-version: "3.7" - - os: windows-latest - python-version: "3.7" - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r Environment_Setup/requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68bc17f --- /dev/null +++ b/.gitignore @@ -0,0 +1,160 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/Controller/mecanum_control_bot.py b/Controller/mecanum_control_bot.py deleted file mode 100644 index c9356ec..0000000 --- a/Controller/mecanum_control_bot.py +++ /dev/null @@ -1,322 +0,0 @@ -""" -CVPRO v1.0.0. -Code Developed by Augustin Rajkumar, Suresh Balaji, E.V.V Thrilok kumar, and Meritus R & D Team - August 31, 2023. -Copyright © 2023 Meritus R & D Team. All rights reserved. -This program is the intellectual property of Meritus AI, and may not be distributed -or reproduced without explicit authorization from the copyright holder. -------------------------------------------------------------------------------------------------------------------- -This script helps in Controlling the bot with keyboard keybinding. -Such as: - w - forward - s - backward - a - Move sideways left - d - Move sideways right - z - Move diagonal left\r - x - Move diagonal right\r - c - Move around a blend left\r - v - Move around a blend right\r - e - Rotation left\r - r - Rotation right\r - f - Rotation around the central point of one axle in left\r - g - Rotation around the central point of one axle in right\r -esc - quit -""" - -# Import Packages -import sys -import socket -import argparse -import pygame -from paho.mqtt import client as mqtt_client -from pygame.locals import ( - K_ESCAPE, - KEYDOWN, - KEYUP, - QUIT, - K_w, K_a, K_s, K_d, - K_z, K_x, K_c, K_v, - K_e, K_r, K_f, K_g, -) - -# screen color -white = (255, 255, 255) -black = (0, 0, 0) -blue = (0, 0, 128) -red = (200, 0, 0) - -# Mqtt Server connection -BROKER = "192.168.4.2" #"broker.hivemq.com" #"192.168.168.94" # "broker.emqx.io" -PORT = 1883 -TOPIC = "cvpro" -# generate client ID with pub prefix randomly -CLIENT_ID = "python-mqtt" -USERNAME = "cvpro" -PASSWORD = "cvpro" - -parser = argparse.ArgumentParser(description="Control the Bot.") -parser.add_argument( - "-c", type=int, default=255, help="integer values to send to bot" -) - -args = parser.parse_args() -x = args.c - -if x > 255: - print("High speed! You should maintain a value under 255.") - # pygame.quit() - sys.exit() -elif x < 200: - print("Low speed! You should maintain a value above 200.") - # pygame.quit() - sys.exit() -else: - print("Your Speed limit 🏎️ --> ", x) - -# Instructions -def caution(): - """ - Display the content in Terminal window - """ - name= r""" - --- ---- ---- ---- ---- ---- ---- ---- ---- ---- - | Note: | - | If you want to stop ? | - | Click the 'X' on pygame window | - | or | - | Press 'esc' to Quit the pygame window | - --- ---- ---- ---- ---- ---- ---- ---- ---- ---- - - _________ ___ ___ _________ __________ ________ - / ________| \ \ / / | ____ \ | _____ \ / ______ \ - / / \ \ / / | | \ \ | | \ \ / / \ \ - | | \ \ / / | | | | | |_____/ / | | | | - | | \ \ / / | |____/ / | |_______/ | | | | - | | \ \ / / | |______/ | | \ \ | | | | - \ \________ \ \/ / | | | | \ \ \ \ _____/ / - \ _________| \____/ |__| |__| \__\ \ ________ / - - - ____ ____ ____________ __________ ____ _____ __ __ __ ____ ____ -| \ / | | _________| / ________| / \ | \ | | | | | | | \ / | -| \ / | | | / / / /\ \ | |\ \ | | | | | | | \ / | -| |\ \/ /| | | |_________ | | / / \ \ | | \ \ | | | | | | | |\ \/ /| | -| | \____/ | | | _________| | | / /____\ \ | | \ \ | | | | | | | | \____/ | | -| | | | | | | | / _______ \ | | \ \| | \ \ / / | | | | -| | | | | |_________ \ \_________ / / \ \ | | \ | | \ \_____/ / | | | | -|__| |__| |____________| \ __________| /__/ \__\ |__| \ ___| \_________/ |__| |__| - - - """ - print(name) - -def usage(): - """ - Display the control keys in Pygame window - """ - usage_str = """ - Make sure to keep the pygame window in focus!\r - - Use the following keys to drive the robot:\r - - \tw : Go forward\r - \ts : Go backward\r - \ta : Move sideways left\r - \td : Move sideways right\r - \tz : Move diagonal left\r - \tx : Move diagonal right\r - \tc : Move around a blend left\r - \tv : Move around a blend right\r - \te : Rotation left\r - \tr : Rotation right\r - \tf : Rotation around the central point of one axle in left\r - \tg : Rotation around the central point of one axle in right\r - \tesc : Quit \r - """ - return usage_str - -class Screen: - """ - Pygame Window Screen - """ - screen = None - font = None - y_pos = 0 - x_pos = 0 - - def setup_screen(self): - """ - Display the Font-size and resolution for screen - """ - pygame.display.set_caption("CVPRO Mecanum Keyboard Controller") - self.font = pygame.font.Font(None, 22) # Use system font - self.screen = pygame.display.set_mode([900, 650], pygame.RESIZABLE) - self.screen.fill(white) - text = usage() - print(text) - lines = text.strip().split("\r") - self.x_pos = 50 - self.y_pos = 50 - delimiter = ":" - for line in lines: - # create a text suface object - if delimiter in line: - space = " " if "\t" in line else "" - elements = line.strip().split(delimiter) - text = self.font.render( - space + elements[0].strip() + delimiter, True, blue - ) - self.screen.blit(text, (self.x_pos, self.y_pos)) - text = self.font.render(elements[1].strip(), True, black) - self.screen.blit(text, (self.x_pos + 200, self.y_pos)) - else: - text = self.font.render(line, True, red) - self.screen.blit(text, (self.x_pos, self.y_pos)) - pygame.display.update() - self.y_pos += 40 - -screen = Screen() - -def connect_mqtt(): - """ - Connection for MQTT server - """ - def on_connect(client, userdata, flags, return_code): - if return_code == 0: - print("Connected to MQTT Broker 🔗 ") - else: - print("Failed to connect, return code %d\n", return_code) - client = mqtt_client.Client(CLIENT_ID) - client.username_pw_set(USERNAME, PASSWORD) - client.on_connect = on_connect - try: - client.connect(BROKER, PORT) - - except ConnectionError as connectionerror: - print(f"Error connecting to MQTT broker: {connectionerror}") - return None - except socket.timeout: - print("Connection Time-out to MQTT broker ⌛️ ") - return None - return client - -def publish(client): - """ - To Publish the keys for controlling the bot. - """ - running = True - login = False - bot = False - camera = False - flashlight = False - msg = None - try: - while running: - for event in pygame.event.get(): - if event.type == KEYDOWN: # control the keys - if event.key == K_w: # moving forward - msg = f"{x}, {x}" - - elif event.key == K_s: # moving backward - msg = f"{-x}, {-x}" - - elif event.key == K_a: # moving sideways left - msg = f"{-30}, {30}" - - elif event.key == K_d: # moving sideways right - msg = f"{30}, {-30}" - - elif event.key == K_z: # moving diagonal left - msg = f"{-15}, {15}" - - elif event.key == K_x: # moving diagonal right - msg = f"{15}, {-15}" - - elif event.key == K_c: # moving around blend left - msg = f"{-60}, {60}" - - elif event.key == K_v: # moving around blend right - msg = f"{60}, {-60}" - - elif event.key == K_e: # Rotation left - msg = f"{-360}, {360}" - - elif event.key == K_r: # Rotation right - msg = f"{360}, {-360}" - - elif event.key == K_f: # Rotation around the central point of one axle in left - msg = f"{-120}, {120}" - - elif event.key == K_g: # Rotation around the central point of one axle in right - msg = f"{120}, {-120}" - - elif event.key == K_ESCAPE: # to quit the pygame - running = False - print("Control Screen - Quit🚪") - break - if msg is not None: - print("Message Published -->",msg) - result = client.publish(TOPIC, msg) - - if event.type == KEYUP: # Releasing the Keys - if event.key == K_ESCAPE: - msg = None - elif event.key == K_w: - msg = f"{0}, {0}" - elif event.key == K_s: - msg = f"{0}, {0}" - elif event.key == K_a: - msg = f"{0}, {0}" - elif event.key == K_d: - msg = f"{0}, {0}" - elif event.key == K_e: - msg = f"{0}, {0}" - elif event.key == K_r: - msg = f"{0}, {0}" - elif event.key == K_f: - msg = f"{0}, {0}" - elif event.key == K_g: - msg = f"{0}, {0}" - elif event.key == K_z: - msg = f"{0}, {0}" - elif event.key == K_x: - msg = f"{0}, {0}" - elif event.key == K_c: - msg = f"{0}, {0}" - elif event.key == K_v: - msg = f"{0}, {0}" - # print(msg) - if msg is not None: - print("Message published in KeyUP ",msg) - result = client.publish(TOPIC, msg) - - if event.type == QUIT: # close the pygame window - running = False - print("Control Screen - Exit ❌") - sys.exit() - # result = client.disconnect() - - if not running: - break # Break the outer loop - - except Exception as exception: - print(f"Exception in Publish: {exception}") - -def run(): - """ - To Run the client, calling the Mqtt Connection - """ - client = connect_mqtt() # calling the Mqtt Connection - - if client is None: # the client is not connected - print("MQTT connection failed. Exiting... 🚪") - return - - client.loop_start() - publish(client) - -# Main -if __name__ == "__main__": - caution() - pygame.init() - screen.setup_screen() - run() diff --git a/Controller/videostream_control_bot.py b/Controller/videostream_control_bot.py deleted file mode 100644 index 121bd4e..0000000 --- a/Controller/videostream_control_bot.py +++ /dev/null @@ -1,343 +0,0 @@ -""" -CVPRO v1.0.0. -Code Developed by Augustin Rajkumar, Suresh Balaji, E.V.V Thrilok kumar, and Meritus R & D Team - August 31, 2023. -Copyright © 2023 Meritus R & D Team. All rights reserved. -This program is the intellectual property of Meritus AI, and may not be distributed -or reproduced without explicit authorization from the copyright holder. ---------------------------------------------------------------------------------------- -This script helps in Video-Streaming and Controlling the bot with keyboard keybinding. -Such as: -Such as: - w - forward - s - backward - w + a - left - w + d - right - b - bot - f - flashlight - c - camera swapping - spacebar - login on\off - esc - quit -""" - -# Import Packages -import sys -import cv2 -import uuid -import base64 -import pygame -import socket -import argparse -import numpy as np -from paho.mqtt import client as mqtt_client -from pygame.locals import ( - K_SPACE, - K_ESCAPE, - KEYDOWN, - KEYUP, - QUIT, - K_w, - K_a, - K_s, - K_d, - K_b, - K_f, - K_c -) - -# screen color -white = (255, 255, 255) -black = (0, 0, 0) -blue = (0, 0, 128) -red = (200, 0, 0) - -# MQTT broker and TOPIC -BROKER = "192.168.4.2" #"broker.hivemq.com" -PORT = 1883 -TOPIC = "cvpro" -TOPIC2 = "video" - -# generate client ID with pub prefix randomly -# CLIENT_ID = "python-mqtt" -USERNAME = "cvpro" -PASSWORD = "cvpro" - -parser = argparse.ArgumentParser(description="Control the Bot.") -parser.add_argument("-c", type=int, default=255, help="integer values to send to bot") -args = parser.parse_args() -x = args.c -if x > 255: - print("High speed! You should maintain a value under 255.") - #pygame.quit() - sys.exit() -elif x < 200: - print("Low speed! You should maintain a value above 200.") - #pygame.quit() - sys.exit() -else: - print("Your Speed limit 🏎️ --> ", x) - -# Instructions -def caution(): - name= r""" - --- ---- ---- ---- ---- ---- ---- ---- ---- ---- - | Note: | - | If you want to stop ? | - | Click the 'X' on pygame window | - | or | - | Press 'esc' to Quit the pygame window | - --- ---- ---- ---- ---- ---- ---- ---- ---- ---- - - _________ ___ ___ _________ __________ ________ - / ________| \ \ / / | ____ \ | _____ \ / ______ \ - / / \ \ / / | | \ \ | | \ \ / / \ \ - | | \ \ / / | | | | | |_____/ / | | | | - | | \ \ / / | |____/ / | |_______/ | | | | - | | \ \ / / | |______/ | | \ \ | | | | - \ \________ \ \/ / | | | | \ \ \ \ _____/ / - \ _________| \____/ |__| |__| \__\ \ ________ / - - - """ - print(name) - -def on_connect(client, userdata, flags, rc): - if rc == 0: - print("Connected to MQTT Broker 🔗 ") - else: - print("Failed to connect, return code %d\n", rc) - -# Callback function for MQTT message -def on_message(client, userdata, msg): - print("Message was received") - if msg.payload is None: - print("Received an empty message payload.") - frame_data = base64.b64decode(msg.payload) - - if len(frame_data) == 0: - print("Received empty frame data.") - - frame = cv2.imdecode(np.frombuffer(frame_data, np.uint8), cv2.IMREAD_COLOR) - - if frame is None: - print("Failed to decode frame.") - # Flip the frame horizontally - # frame = cv2.flip(frame, 1) - # Convert the OpenCV frame to a Pygame surface - frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) - frame = np.rot90(frame, k=2) # Rotate 180 degrees counter-clockwise - frame = np.fliplr(frame) # Flip the frame horizontally - frame = pygame.surfarray.make_surface(frame) - # Update the video frame - video_frame.blit(frame, (0, 0)) - -# Set up the display -screen_width = 930 -screen_height = 600 -control_width = screen_width // 2 -video_width = screen_width - control_width -#screen-size -screen = pygame.display.set_mode((screen_width, screen_height)) -pygame.display.set_caption("CVPRO Keyboard Controller") - -# Define the left and right display surfaces -control_display = pygame.Surface((control_width, screen_height)) -video_display = pygame.Surface((video_width, screen_height)) -# print("video_width: ", video_width) -# print("screen_height: ", screen_height) - -def display_text(): - # Render and blit the usage text on the control display - usage_text = """ - Make sure to keep the pygame window in focus!\r - - Use the following keys to drive the robot:\r - - \tw : Go forward\r - \ts : Go backward\r - \tw + a : Turn slightly left (while driving)\r - \tw + d : Turn slightly right (while driving)\r - \tb : To Drive turn the bot on/off\r - \tf : Turn on/off Flashlight\r - \tc : Camera Swapping Mode\r - \tspace-bar : Data Collection Start/End\r - \tesc : Quit\r - """ - lines = usage_text.strip().split("\r") - line_height = 30 - # Render and blit the usage text on the control display - x_pos = 50 - y_pos = 50 - delimiter = ":" - for line in lines: - if delimiter in line: - space = " " if "\t" in line else "" - elements = line.strip().split(delimiter) - text = font.render(space + elements[0].strip() + delimiter, True, blue) - control_display.blit(text, (x_pos, y_pos)) - text = font.render(elements[1].strip(), True, black) - control_display.blit(text, (x_pos + 200, y_pos)) - else: - text = font.render(line, True, red) - control_display.blit(text, (x_pos, y_pos)) - y_pos += line_height - - -# Initalize the pygame screen -pygame.init() -caution() -# Font for usage information -font = pygame.font.Font(None, 20) - -# Initialize video frame -video_frame = pygame.Surface((465, 600)) - -# Generate a UUID version 4 -uuid_obj = uuid.uuid4() - -# Convert the UUID to a string -uuid_string = str(uuid_obj) - -# MQTT client setup -client = mqtt_client.Client(f"VideoReceiver-{uuid_string}") -client.username_pw_set(USERNAME, PASSWORD) -client.on_connect = on_connect -client.on_message = on_message -try: - client.connect(BROKER, PORT) -except ConnectionError as connectionerror: - print(f"Error connecting to MQTT broker: {connectionerror}") -except socket.timeout: - print("Connection Time-out to MQTT broker ⌛️ ") -# subscribe -client.subscribe(TOPIC2, qos=2) -client.loop_start() - -# Declare -running = True -login = False -bot = False -camera = False -flashlight = False -msg = None -# Main loop -while running: - for event in pygame.event.get(): - if event.type == KEYDOWN: # control the keys - if event.key == K_w: # moving forward - msg = f"{x}, {x}" - - elif event.key == K_s: # moving backward - msg = f"{-x}, {-x}" - - elif event.key == K_a: # moving left - if pygame.key.get_pressed()[K_w]: - msg = f"{-int(x * 0.75)}, {x}" - - elif event.key == K_d: # moving right - if pygame.key.get_pressed()[K_w]: - msg = f"{x}, {-int(x * 0.75)}" - - elif event.key == K_SPACE: # Data collection - if not login: - msg = "login_on" - # print("login start") - login = True - - elif login == True: - msg = "login_off" - # print("login stop") - login = False - if bot == True: # bot is turn-off when the login is off - print("Message Published as bot_off") - bot = False - - elif event.key == K_b: # to turn-on/off the bot - if not bot: - msg = "bot_on" - # print("bot on") - bot = True - else: - msg = "bot_off" - # print("bot off") - bot = False - - elif event.key == K_c: # camera swapping - if not camera: - msg = "front_camera" - # print("camera swap into Front-side") - camera = True - else: - msg = "back_camera" - # print("camera swap into Back-side") - camera = False - - elif event.key == K_f: # flashlight - if not flashlight: - msg = "flashlight_on" - # print("flashlight on") - flashlight = True - else: - msg = "flashlight_off" - # print("flashlight off") - flashlight = False - - elif event.key == K_ESCAPE: # to quit the pygame - running = False - print("Data Collection - Exit ❌") - break - if msg is not None: - print("Message Published -->", msg) - result = client.publish(TOPIC, msg) - - if event.type == KEYUP: # Releasing the Keys - if event.key in (K_SPACE, K_c, K_f, K_ESCAPE): - if event.key == K_SPACE: - msg = None - elif event.key == K_c: - msg = None - elif event.key == K_f: - msg = None - elif event.key == K_b: - msg = None - elif event.key == K_ESCAPE: - msg = None - - elif event.key == K_w: - msg = f"{0}, {0}" - elif event.key in [K_a, K_d]: - if pygame.key.get_pressed()[K_w]: - msg = f"{x}, {x}" - elif pygame.key.get_pressed()[K_s]: - msg = f"{-x}, {-x}" - else: - msg = f"{0}, {0}" - elif event.key == K_s: - msg = f"{0}, {0}" - # print(msg) - if msg is not None: - print("Message published in KeyUP ", msg) - result = client.publish(TOPIC, msg) - - if event.type == QUIT: # close the pygame window - running = False - print("Data Collection - Quit 🚪") - sys.exit() - - # Clear the screens - control_display.fill(white) - video_display.fill(white) - display_text() - # Blit the video frame on the video display - video_display.blit(video_frame, (0, 0)) - - # Blit the control and video displays onto the main screen - screen.blit(control_display, (0, 0)) - screen.blit(video_display, (control_width, 0)) - - pygame.display.update() - -# Clean up resources -cv2.destroyAllWindows() -client.disconnect() -#pygame.quit() -sys.exit() \ No newline at end of file diff --git a/Environment_Setup/requirements.txt b/Environment_Setup/requirements.txt deleted file mode 100644 index 9999f46..0000000 --- a/Environment_Setup/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -tqdm -numpy -pygame~=2.4.0 -pandas -pillow -notebook -seaborn -paho-mqtt -matplotlib -scikit-learn -opencv-python~=4.5.4.60 - - - - - diff --git a/Meritus-CVPRO-main/Controller/activate_cvpro.bat b/Meritus-CVPRO-main/Controller/activate_cvpro.bat new file mode 100644 index 0000000..3d45b3f --- /dev/null +++ b/Meritus-CVPRO-main/Controller/activate_cvpro.bat @@ -0,0 +1,81 @@ +@echo off + +title Conda Environment - Build and Activate + +set "userProfile=%USERPROFILE%" + +:checkInternetConnection +ping 8.8.8.8 -n 1 -w 1000 >nul +if errorlevel 1 ( + echo [31mPlease connect to the internet and try again.[0m + exit /b +) + +:waitForInput +echo Hi! Please Ensure Internet Connection! +set /p userInput="Give me a command - '[38;5;74mbuild[0m' or '[38;5;74mactivate[0m' or '[38;5;74mdeactivate[0m': " +if /i "%userInput%"=="build" ( + echo Creating a Virtual Environment:- cvpro ... + call "%userProfile%\miniconda3\Scripts\activate.bat" "%userProfile%\miniconda3" + call conda create -n cvpro python=3.9 -y + echo [38;5;74mBuilding the Environment...[0m + + if errorlevel 1 ( + echo [31mBuild failed.[0m + ) else if errorlevel 0 ( + echo [92mBuild is Successful.[0m + echo. + echo [38;5;74mActivating the Environment[0m + call conda activate cvpro + echo [92mcvpro Environment is Built and Activated...[0m + echo. + echo Now you are ready for Installation Process. + echo. + echo Type '[38;5;74minstall_cvpro[0m' to Install the Dependencies + ) + +) else if /i "%userInput%"=="activate" ( + call "%userProfile%\miniconda3\Scripts\activate.bat" "%userProfile%\miniconda3" + REM Check if environment exists before activating + call conda info --envs | findstr /C:"cvpro" > nul + if errorlevel 1 ( + echo [38;5;74mEnvironment cvpro not found.[0m + echo [31mActivation failed.[0m + ) else ( + call conda activate cvpro + echo [92mcvpro Environment is Activated...[0m + echo. + echo [38;5;74mFor Data Collection Process:[0m + echo ---------------------------- + echo. + echo 1. Please Disconnect the Internet, and connect the Bot with the System. Ensure the Connected IPv4 Address is: [38;5;74m192.168.4.2[0m + echo 2. Type '[38;5;74mlaunch_server[0m' to Launch the MQTT Server to run the Bot! + echo 3. Type '[38;5;74mrun_cvpro[0m' to begin the Data Collection Process! + echo. + echo [38;5;74mFor Training Process:[0m + echo --------------------- + echo. + echo 1. Ensure your Bot is disconnected from the System as well as the Application. + echo 2. Type '[38;5;74mtrain_cvpro[0m' to begin the Training Process! + echo. + + ) +) else if /i "%userInput%"=="deactivate" ( + call "%userProfile%\miniconda3\Scripts\activate.bat" "%userProfile%\miniconda3" + REM Check if environment exists before activating + call conda info --envs | findstr /C:"cvpro" > nul + if errorlevel 1 ( + echo [38;5;74mEnvironment cvpro not found.[0m + echo [31mDe-Activation failed.[0m + ) else ( + call conda activate cvpro + call conda.bat deactivate + echo. + echo [92mcvpro Environment is De-Activated[0m + ) + +) else ( + echo [31mInvalid command. Please enter '[38;5;74mbuild[31m' or '[38;5;74mactivate[31m' or '[38;5;74mdeactivate[31m'.[0m + echo. + goto waitForInput +) diff --git a/Controller/control_bot.py b/Meritus-CVPRO-main/Controller/control_bot.py similarity index 84% rename from Controller/control_bot.py rename to Meritus-CVPRO-main/Controller/control_bot.py index 2a56478..f5b4042 100644 --- a/Controller/control_bot.py +++ b/Meritus-CVPRO-main/Controller/control_bot.py @@ -30,6 +30,10 @@ KEYDOWN, KEYUP, QUIT, + K_UP, + K_DOWN, + K_LEFT, + K_RIGHT, K_w, K_a, K_s, @@ -54,24 +58,25 @@ USERNAME = "cvpro" PASSWORD = "cvpro" -parser = argparse.ArgumentParser(description="Control the Bot.") -parser.add_argument( - "-c", type=int, default=255, help="integer values to send to bot" -) - -args = parser.parse_args() -x = args.c - -if x > 255: - print("High speed! You should maintain a value under 255.") - # pygame.quit() - sys.exit() -elif x < 200: - print("Low speed! You should maintain a value above 200.") - # pygame.quit() - sys.exit() -else: - print("Your Speed limit 🏎️ --> ", x) +def speed_input(): + global x + user_input = input("Enter a valid Speed Limit (170-255):") + + if not user_input: + print("No input provided. Please enter a valid speed limit.") + speed_input() + return + + x = int(user_input) + + if x > 255: + print("High speed! You should maintain a value under 255! Default is 220.") + speed_input() + elif x < 200: + print("Low speed! You should maintain a value above 200! Default is 220.") + speed_input() + else: + print("Your Speed limit 🏎️ --> ", x) # Instructions def caution(): @@ -172,6 +177,7 @@ def on_connect(client, userdata, flags, return_code): else: print("Failed to connect, return code %d\n", return_code) client = mqtt_client.Client(CLIENT_ID) + #client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, CLIENT_ID) client.username_pw_set(USERNAME, PASSWORD) client.on_connect = on_connect try: @@ -199,17 +205,20 @@ def publish(client): while running: for event in pygame.event.get(): if event.type == KEYDOWN: # control the keys - if event.key == K_w: # moving forward + if event.key in (K_UP, K_w): # moving forward msg = f"{x}, {x}" - elif event.key == K_s: # moving backward + elif event.key in (K_DOWN, K_s): # moving backward msg = f"{-x}, {-x}" - elif event.key == K_a: # moving left - if pygame.key.get_pressed()[K_w]: + elif event.key in (K_LEFT, K_a): # moving left + # Check if the UP key or W key is pressed for diagonal movement + if pygame.key.get_pressed()[K_UP] or pygame.key.get_pressed()[K_w]: msg = f"{-int(x * 0.75)}, {x}" - elif event.key == K_d: # moving right - if pygame.key.get_pressed()[K_w]: + + elif event.key in (K_RIGHT, K_d): # moving right + # Check if the UP key or W key is pressed for diagonal movement + if pygame.key.get_pressed()[K_UP] or pygame.key.get_pressed()[K_w]: msg = f"{x}, {-int(x * 0.75)}" elif event.key == K_SPACE: # Data collection @@ -289,6 +298,18 @@ def publish(client): msg = f"{0}, {0}" elif event.key == K_s: msg = f"{0}, {0}" + + elif event.key == K_UP: + msg = f"{0}, {0}" + elif event.key in [K_LEFT, K_RIGHT]: + if pygame.key.get_pressed()[K_UP]: + msg = f"{x}, {x}" + elif pygame.key.get_pressed()[K_DOWN]: + msg = f"{-x}, {-x}" + else: + msg = f"{0}, {0}" + elif event.key == K_DOWN: + msg = f"{0}, {0}" # print(msg) if msg is not None: print("Message published in KeyUP ",msg) @@ -321,7 +342,8 @@ def run(): # Main if __name__ == "__main__": + speed_input() caution() pygame.init() screen.setup_screen() - run() + run() \ No newline at end of file diff --git a/Meritus-CVPRO-main/Controller/install.bat b/Meritus-CVPRO-main/Controller/install.bat new file mode 100644 index 0000000..0ad2b41 --- /dev/null +++ b/Meritus-CVPRO-main/Controller/install.bat @@ -0,0 +1,81 @@ +@echo off +title Installation of Libraries +set "userProfile=%USERPROFILE%" + +:checkInternetConnection +ping 8.8.8.8 -n 1 -w 1000 >nul +if errorlevel 1 ( + echo [31mPlease connect to the internet and try again.[0m + exit /b +) + +:waitForInput +set /p userInput="Do you have a valid Internet Connection? - '[38;5;74my[0m' or '[38;5;74mn[0m': " +if /i "%userInput%"=="y" ( + echo [38;5;74mInstalling dependencies...................[0m + + cd "%userProfile%\Meritus-CVPRO-Windows\Meritus-CVPRO-main\Controller" + + call %userProfile%\miniconda3\envs\cvpro\python.exe -m pip install --upgrade pip + REM call conda install cudatoolkit -y + REM call conda install cudnn -y + call pip install tensorflow~=2.9.0 + + call cd %userProfile%\Meritus-CVPRO-Windows\Meritus-CVPRO-main\Environment_Setup + + call pip install -r requirements.txt + + + + if errorlevel 1 ( + + call :echoredError Installation failed! + echo. + call :echoblueError Check for the following: + echo. + echo 1. Please ensure your Internet Connectivity is Stable. + echo 2. Please ensure you have activated the 'cvpro' Environment. + echo 3. Please ensure you have followed the execution steps in the order given. + echo. + + ) else ( + + echo. + call :echogreenError Installation is Completed! + echo. + + call :echoblueError For Data Collection Process: + echo ---------------------------- + echo. + echo 1. Please Disconnect the Internet, and connect the Bot with the System. Ensure the Connected IPv4 Address is: [38;5;74m192.168.4.2[0m + echo 2. Type '[38;5;74mlaunch_server[0m' to Launch the MQTT Server to run the Bot! + echo 3. Type '[38;5;74mrun_cvpro[0m' to begin the Data Collection Process! + echo. + echo [38;5;74mFor Training Process:[0m + echo --------------------- + echo. + echo 1. Ensure your Bot is disconnected from the System as well as the Application. + echo 2. Type ' [38;5;74mtrain_cvpro [0m' to begin the Training Process! + ) + +) else if /i "%userInput%"=="n" ( + echo [38;5;74mPlease do have a valid Internet Connection for the Installation Process.[0m +) else ( + echo [31mInvalid command. Please enter '[38;5;74my[31m' or '[38;5;74mn[31m'.[0m + echo. + goto waitForInput +) + + +:echoredError +echo [31m%*[0m +exit /b + +:echoblueError +echo [38;5;74m%*[0m +exit /b + +:echogreenError +echo [92m%*[0m +exit /b + diff --git a/Meritus-CVPRO-main/Controller/launch_mosquitto.bat b/Meritus-CVPRO-main/Controller/launch_mosquitto.bat new file mode 100644 index 0000000..0db6414 --- /dev/null +++ b/Meritus-CVPRO-main/Controller/launch_mosquitto.bat @@ -0,0 +1,5 @@ +@echo off +set "userProfile=%USERPROFILE%" +title MQTT Server +cd "%userProfile%\Meritus-CVPRO-Windows\Meritus-CVPRO-main\Environment_Setup" +"C:\Program Files\mosquitto\mosquitto.exe" -v -c mqtt_conf.conf diff --git a/Meritus-CVPRO-main/Controller/test_run.bat b/Meritus-CVPRO-main/Controller/test_run.bat new file mode 100644 index 0000000..1802305 --- /dev/null +++ b/Meritus-CVPRO-main/Controller/test_run.bat @@ -0,0 +1,39 @@ +@echo off +title Data Collection Process +set "userProfile=%USERPROFILE%" +cd "%userProfile%\Meritus-CVPRO-Windows\Meritus-CVPRO-main\Controller" + +call cls + +:waitForChoice +set /p userInput="Enter your choice - '[38;5;74mcontrol[0m' or '[38;5;74mvideostream[0m': " + +if /i "%userInput%"=="control" ( + call :run_bot control_bot.py +) else if /i "%userInput%"=="videostream" ( + call :run_bot videostream_control_bot.py +) else ( + echo [31mInvalid choice. Please enter '[38;5;74mcontrol[31m' or '[38;5;74mvideostream[31m'.[0m + echo. + goto waitForChoice +) + +goto :eof + +:run_bot +:waitForInput +set /p userInput="Is your Bot connected with the Application? - '[38;5;74my[0m' or '[38;5;74mn[0m': " +if /i "%userInput%"=="y" ( + echo [92mRunning the Bot.......[0m +) else if /i "%userInput%"=="n" ( + echo [38;5;74mPlease connect the bot with your Application![0m + exit /b +) else ( + echo [31mInvalid command. Please enter '[38;5;74my[31m' or '[38;5;74mn[31m'.[0m + echo. + goto waitForInput +) +call python %1 +echo. +echo Type '[38;5;74mrun_cvpro[0m' or '[38;5;74mtrain_cvpro[0m' according to your requirement! +goto :eof diff --git a/Meritus-CVPRO-main/Controller/train.bat b/Meritus-CVPRO-main/Controller/train.bat new file mode 100644 index 0000000..412d2ad --- /dev/null +++ b/Meritus-CVPRO-main/Controller/train.bat @@ -0,0 +1,52 @@ +@echo off +title Training Process +set "userProfile=%USERPROFILE%" +cd "%userProfile%\Meritus-CVPRO-Windows\Meritus-CVPRO-main\Training_Process" + +call cls + +:waitForInput +set /p userInput="Is your Bot Disconnected from the Application and System? - '[38;5;74my[0m' or '[38;5;74mn[0m': " +if /i "%userInput%"=="y" ( + echo [92mInitializing the Training Process![0m +) else if /i "%userInput%"=="n" ( + echo [38;5;74mPlease disconnect the Bot from your Application and the System![0m + exit /b +) else ( + echo [31mInvalid command. Please enter '[38;5;74my[31m' or '[38;5;74mn[31m'.[0m + echo. + goto :waitForInput +) + +set /p batchSize="Give me a valid Batch Size [16, 32, 64, 128]: " +if "%batchSize%"=="" set "batchSize=32" +echo [38;5;74mMy Batch Size:[0m %batchSize% +echo. + + +set /p epochValue="Give me a valid Epoch Value [5, 10, 20, 25, 50, 100]: " +if "%epochValue%"=="" set "epochValue=5" +echo [38;5;74mMy Epoch Value:[0m %epochValue% +echo. + + +set /p learningRate="Give me a valid Learning Rate [0.00001, 0.0001, 0.001, 0.01, 0.1, 1]: " +if "%learningRate%"=="" set "learningRate=0.0001" +echo [38;5;74mMy Learning Rate:[0m %learningRate% +echo. + +echo Deleting the Garbage Files, that are not required for Training Process.......... + +call :delFiles +timeout /t 2 >nul + +echo Garbage Files are Deleted + +call python main.py -b %batchSize% -e %epochValue% -lr %learningRate% + +:delFiles +for /r %%i in (gitkeep) do ( + if exist "%%i" ( + del "%%i" /q /f + ) +) \ No newline at end of file diff --git a/Meritus-CVPRO-main/Controller/videostream_control_bot.py b/Meritus-CVPRO-main/Controller/videostream_control_bot.py new file mode 100644 index 0000000..4aa6d1b --- /dev/null +++ b/Meritus-CVPRO-main/Controller/videostream_control_bot.py @@ -0,0 +1,369 @@ +""" +CVPRO v1.0.0. +Code Developed by Augustin Rajkumar, Suresh Balaji, E.V.V Thrilok kumar, and Meritus R & D Team - August 31, 2023. +Copyright © 2023 Meritus R & D Team. All rights reserved. +This program is the intellectual property of Meritus AI, and may not be distributed +or reproduced without explicit authorization from the copyright holder. +--------------------------------------------------------------------------------------- +This script helps in Video-Streaming and Controlling the bot with keyboard keybinding. +Such as: +Such as: + w - forward + s - backward + w + a - left + w + d - right + b - bot + f - flashlight + c - camera swapping + spacebar - login on\off + esc - quit +""" + +# Import Packages +import sys +import cv2 +import uuid +import base64 +import pygame +import socket +import argparse +import numpy as np +from paho.mqtt import client as mqtt_client +from pygame.locals import ( + K_SPACE, + K_ESCAPE, + KEYDOWN, + KEYUP, + QUIT, + K_UP, + K_DOWN, + K_LEFT, + K_RIGHT, + K_w, + K_a, + K_s, + K_d, + K_b, + K_f, + K_c +) + +# screen color +white = (255, 255, 255) +black = (0, 0, 0) +blue = (0, 0, 128) +red = (200, 0, 0) + +# MQTT broker and TOPIC +BROKER = "192.168.4.2" #"broker.hivemq.com" +PORT = 1883 +TOPIC = "cvpro" +TOPIC2 = "video" + +# generate client ID with pub prefix randomly +# CLIENT_ID = "python-mqtt" +USERNAME = "cvpro" +PASSWORD = "cvpro" + +def speed_input(): + global x + user_input = input("Enter a valid Speed Limit (170-255):") + + if not user_input: + print("No input provided. Please enter a valid speed limit.") + speed_input() + return + + x = int(user_input) + + if x > 255: + print("High speed! You should maintain a value under 255! Default is 220.") + speed_input() + elif x < 200: + print("Low speed! You should maintain a value above 200! Default is 220.") + speed_input() + else: + print("Your Speed limit 🏎️ --> ", x) + +def main(): + + # Instructions + def caution(): + name= r""" + --- ---- ---- ---- ---- ---- ---- ---- ---- ---- + | Note: | + | If you want to stop ? | + | Click the 'X' on pygame window | + | or | + | Press 'esc' to Quit the pygame window | + --- ---- ---- ---- ---- ---- ---- ---- ---- ---- + + _________ ___ ___ _________ __________ ________ + / ________| \ \ / / | ____ \ | _____ \ / ______ \ + / / \ \ / / | | \ \ | | \ \ / / \ \ + | | \ \ / / | | | | | |_____/ / | | | | + | | \ \ / / | |____/ / | |_______/ | | | | + | | \ \ / / | |______/ | | \ \ | | | | + \ \________ \ \/ / | | | | \ \ \ \ _____/ / + \ _________| \____/ |__| |__| \__\ \ ________ / + + + """ + print(name) + + def on_connect(client, userdata, flags, rc): + if rc == 0: + print("Connected to MQTT Broker 🔗 ") + else: + print("Failed to connect, return code %d\n", rc) + + # Callback function for MQTT message + def on_message(client, userdata, msg): + print("Message was received") + if msg.payload is None: + print("Received an empty message payload.") + frame_data = base64.b64decode(msg.payload) + + if len(frame_data) == 0: + print("Received empty frame data.") + + frame = cv2.imdecode(np.frombuffer(frame_data, np.uint8), cv2.IMREAD_COLOR) + + if frame is None: + print("Failed to decode frame.") + # Flip the frame horizontally + # frame = cv2.flip(frame, 1) + # Convert the OpenCV frame to a Pygame surface + frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) + frame = np.rot90(frame, k=2) # Rotate 180 degrees counter-clockwise + frame = np.fliplr(frame) # Flip the frame horizontally + frame = pygame.surfarray.make_surface(frame) + # Update the video frame + video_frame.blit(frame, (0, 0)) + + # Set up the display + screen_width = 930 + screen_height = 600 + control_width = screen_width // 2 + video_width = screen_width - control_width + #screen-size + screen = pygame.display.set_mode((screen_width, screen_height)) + pygame.display.set_caption("CVPRO Keyboard Controller") + + # Define the left and right display surfaces + control_display = pygame.Surface((control_width, screen_height)) + video_display = pygame.Surface((video_width, screen_height)) + # print("video_width: ", video_width) + # print("screen_height: ", screen_height) + + def display_text(): + # Render and blit the usage text on the control display + usage_text = """ + Make sure to keep the pygame window in focus!\r + + Use the following keys to drive the robot:\r + + \tw : Go forward\r + \ts : Go backward\r + \tw + a : Turn slightly left (while driving)\r + \tw + d : Turn slightly right (while driving)\r + \tb : To Drive turn the bot on/off\r + \tf : Turn on/off Flashlight\r + \tc : Camera Swapping Mode\r + \tspace-bar : Data Collection Start/End\r + \tesc : Quit\r + """ + lines = usage_text.strip().split("\r") + line_height = 30 + # Render and blit the usage text on the control display + x_pos = 50 + y_pos = 50 + delimiter = ":" + for line in lines: + if delimiter in line: + space = " " if "\t" in line else "" + elements = line.strip().split(delimiter) + text = font.render(space + elements[0].strip() + delimiter, True, blue) + control_display.blit(text, (x_pos, y_pos)) + text = font.render(elements[1].strip(), True, black) + control_display.blit(text, (x_pos + 200, y_pos)) + else: + text = font.render(line, True, red) + control_display.blit(text, (x_pos, y_pos)) + y_pos += line_height + + + # Initalize the pygame screen + pygame.init() + caution() + # Font for usage information + font = pygame.font.Font(None, 20) + + # Initialize video frame + video_frame = pygame.Surface((465, 600)) + + # Generate a UUID version 4 + uuid_obj = uuid.uuid4() + + # Convert the UUID to a string + uuid_string = str(uuid_obj) + + # MQTT client setup + client = mqtt_client.Client(f"VideoReceiver-{uuid_string}") + client.username_pw_set(USERNAME, PASSWORD) + client.on_connect = on_connect + client.on_message = on_message + try: + client.connect(BROKER, PORT) + except ConnectionError as connectionerror: + print(f"Error connecting to MQTT broker: {connectionerror}") + except socket.timeout: + print("Connection Time-out to MQTT broker ⌛️ ") + # subscribe + client.subscribe(TOPIC2, qos=2) + client.loop_start() + + # Declare + running = True + login = False + bot = False + camera = False + flashlight = False + msg = None + # Main loop + while running: + for event in pygame.event.get(): + if event.type == KEYDOWN: # control the keys + if event.key in (K_w,K_UP): # moving forward + msg = f"{x}, {x}" + + elif event.key in (K_s,K_DOWN): # moving backward + msg = f"{-x}, {-x}" + + elif event.key in (K_a,K_LEFT): # moving left + if pygame.key.get_pressed()[K_w] or pygame.key.get_pressed()[K_UP] : + msg = f"{-int(x * 0.75)}, {x}" + + elif event.key in (K_d,K_RIGHT): # moving right + if pygame.key.get_pressed()[K_w] or pygame.key.get_pressed()[K_UP]: + msg = f"{x}, {-int(x * 0.75)}" + + elif event.key == K_SPACE: # Data collection + if not login: + msg = "login_on" + # print("login start") + login = True + + elif login == True: + msg = "login_off" + # print("login stop") + login = False + if bot == True: # bot is turn-off when the login is off + print("Message Published as bot_off") + bot = False + + elif event.key == K_b: # to turn-on/off the bot + if not bot: + msg = "bot_on" + # print("bot on") + bot = True + else: + msg = "bot_off" + # print("bot off") + bot = False + + elif event.key == K_c: # camera swapping + if not camera: + msg = "front_camera" + # print("camera swap into Front-side") + camera = True + else: + msg = "back_camera" + # print("camera swap into Back-side") + camera = False + + elif event.key == K_f: # flashlight + if not flashlight: + msg = "flashlight_on" + # print("flashlight on") + flashlight = True + else: + msg = "flashlight_off" + # print("flashlight off") + flashlight = False + + elif event.key == K_ESCAPE: # to quit the pygame + running = False + print("Data Collection - Exit ❌") + break + if msg is not None: + print("Message Published -->", msg) + result = client.publish(TOPIC, msg) + + if event.type == KEYUP: # Releasing the Keys + if event.key in (K_SPACE, K_c, K_f, K_ESCAPE): + if event.key == K_SPACE: + msg = None + elif event.key == K_c: + msg = None + elif event.key == K_f: + msg = None + elif event.key == K_b: + msg = None + elif event.key == K_ESCAPE: + msg = None + + elif event.key == K_w: + msg = f"{0}, {0}" + elif event.key in [K_a, K_d]: + if pygame.key.get_pressed()[K_w]: + msg = f"{x}, {x}" + elif pygame.key.get_pressed()[K_s]: + msg = f"{-x}, {-x}" + else: + msg = f"{0}, {0}" + elif event.key == K_s: + msg = f"{0}, {0}" + # print(msg) + elif event.key == K_UP: + msg = f"{0}, {0}" + elif event.key in [K_LEFT, K_RIGHT]: + if pygame.key.get_pressed()[K_UP]: + msg = f"{x}, {x}" + elif pygame.key.get_pressed()[K_DOWN]: + msg = f"{-x}, {-x}" + else: + msg = f"{0}, {0}" + elif event.key == K_DOWN: + msg = f"{0}, {0}" + if msg is not None: + print("Message published in KeyUP ", msg) + result = client.publish(TOPIC, msg) + + if event.type == QUIT: # close the pygame window + running = False + print("Data Collection - Quit 🚪") + sys.exit() + + # Clear the screens + control_display.fill(white) + video_display.fill(white) + display_text() + # Blit the video frame on the video display + video_display.blit(video_frame, (0, 0)) + + # Blit the control and video displays onto the main screen + screen.blit(control_display, (0, 0)) + screen.blit(video_display, (control_width, 0)) + + pygame.display.update() + + # Clean up resources + cv2.destroyAllWindows() + client.disconnect() + #pygame.quit() + sys.exit() + +if __name__ == '__main__': + speed_input() + main() \ No newline at end of file diff --git a/Environment_Setup/mqtt_conf.conf b/Meritus-CVPRO-main/Environment_Setup/mqtt_conf.conf similarity index 100% rename from Environment_Setup/mqtt_conf.conf rename to Meritus-CVPRO-main/Environment_Setup/mqtt_conf.conf diff --git a/Meritus-CVPRO-main/Environment_Setup/requirements.txt b/Meritus-CVPRO-main/Environment_Setup/requirements.txt new file mode 100644 index 0000000..107a1ff --- /dev/null +++ b/Meritus-CVPRO-main/Environment_Setup/requirements.txt @@ -0,0 +1,15 @@ +tqdm~=4.66.1 +numpy~=1.26.0 +pygame~=2.4.0 +pandas~=2.1.1 +pillow~=10.1.0 +seaborn~=0.13.0 +paho-mqtt~=1.6.1 +matplotlib~=3.8.0 +scikit-learn~=1.3.1 +opencv-python~=4.5.4.60 + + + + + diff --git a/Images/app-store-cvpro.png b/Meritus-CVPRO-main/Images/app-store-cvpro.png similarity index 100% rename from Images/app-store-cvpro.png rename to Meritus-CVPRO-main/Images/app-store-cvpro.png diff --git a/Images/cvpro-mecanum.png b/Meritus-CVPRO-main/Images/cvpro-mecanum.png similarity index 100% rename from Images/cvpro-mecanum.png rename to Meritus-CVPRO-main/Images/cvpro-mecanum.png diff --git a/Images/cvpro.png b/Meritus-CVPRO-main/Images/cvpro.png similarity index 100% rename from Images/cvpro.png rename to Meritus-CVPRO-main/Images/cvpro.png diff --git a/Images/play-store-cvpro.png b/Meritus-CVPRO-main/Images/play-store-cvpro.png similarity index 100% rename from Images/play-store-cvpro.png rename to Meritus-CVPRO-main/Images/play-store-cvpro.png diff --git a/Training_Process/Training_Data/Dataset_CVPRO/Autonomous_Driving/.gitkeep b/Meritus-CVPRO-main/Training_Process/Training_Data/Dataset_CVPRO/Autonomous_Driving/gitkeep similarity index 100% rename from Training_Process/Training_Data/Dataset_CVPRO/Autonomous_Driving/.gitkeep rename to Meritus-CVPRO-main/Training_Process/Training_Data/Dataset_CVPRO/Autonomous_Driving/gitkeep diff --git a/Training_Process/Training_Data/Dataset_CVPRO/Image_Classification/.gitkeep b/Meritus-CVPRO-main/Training_Process/Training_Data/Dataset_CVPRO/Image Classification/gitkeep similarity index 100% rename from Training_Process/Training_Data/Dataset_CVPRO/Image_Classification/.gitkeep rename to Meritus-CVPRO-main/Training_Process/Training_Data/Dataset_CVPRO/Image Classification/gitkeep diff --git a/Training_Process/Utils/createdataset.py b/Meritus-CVPRO-main/Training_Process/Utils/createdataset.py similarity index 100% rename from Training_Process/Utils/createdataset.py rename to Meritus-CVPRO-main/Training_Process/Utils/createdataset.py diff --git a/Training_Process/Utils/encoder.py b/Meritus-CVPRO-main/Training_Process/Utils/encoder.py similarity index 100% rename from Training_Process/Utils/encoder.py rename to Meritus-CVPRO-main/Training_Process/Utils/encoder.py diff --git a/Training_Process/Utils/train.py b/Meritus-CVPRO-main/Training_Process/Utils/train.py similarity index 100% rename from Training_Process/Utils/train.py rename to Meritus-CVPRO-main/Training_Process/Utils/train.py diff --git a/Training_Process/main.ipynb b/Meritus-CVPRO-main/Training_Process/main.ipynb similarity index 100% rename from Training_Process/main.ipynb rename to Meritus-CVPRO-main/Training_Process/main.ipynb diff --git a/Training_Process/main.py b/Meritus-CVPRO-main/Training_Process/main.py similarity index 100% rename from Training_Process/main.py rename to Meritus-CVPRO-main/Training_Process/main.py diff --git a/README.md b/README.md index ef836ad..05c8979 100644 --- a/README.md +++ b/README.md @@ -1,362 +1,89 @@ -# CV Pro -
-
-
|
-
- |
-
-
- |
-
| Android 📱 App | -iOS 📱 App | -
-
-