Some Tweaks

This commit is contained in:
Rames The Generic committed 2023-08-10 10:37:12 -04:00
1 parent 3a6c256f7a
commit b3dd5df8a1
17 files changed
+46733 -13

No files matched your search

Binary file not shown.
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large. Load diff
+6 -1
View File
@@ -223,7 +223,12 @@ class BabbleProcessor:
if not self.capture_crop_rotate_image():
continue
if self.settings.gui_use_red_channel: # Make G and B channels equal to red.
blue_channel, green_channel, red_channel = cv2.split(self.current_image)
new_blue_channel = red_channel
new_green_channel = red_channel
self.current_image = cv2.merge((new_blue_channel, new_green_channel, red_channel))
self.current_image_gray = cv2.cvtColor(
self.current_image, cv2.COLOR_BGR2GRAY
)
+8 -1
View File
@@ -46,7 +46,7 @@ SETTINGS_RADIO_NAME = "-SETTINGSRADIO-"
ALGO_SETTINGS_RADIO_NAME = "-ALGOSETTINGSRADIO-"
page_url = "https://github.com/SummerSigh/ProjectBabble/releases/latest"
appversion = "Babble v2.0.3"
appversion = "Babble v2.0.4 DEV"
def main():
@@ -133,6 +133,7 @@ def main():
default=(config.cam_display_id == Tab.ALGOSETTINGS),
key=ALGO_SETTINGS_RADIO_NAME,
),
],
[
sg.Column(
@@ -156,6 +157,7 @@ def main():
visible=(config.cam_display_id in [Tab.ALGOSETTINGS]),
background_color="#424042",
),
],
]
@@ -166,6 +168,10 @@ def main():
settings[0].start()
if config.cam_display_id in [Tab.ALGOSETTINGS]:
settings[1].start()
'''
if config.cam_display_id in [Tab.CALIBSETTINGS]:
settings[2].start()
'''
# the cam needs to be running before it is passed to the OSC
if config.settings.gui_ROSC:
@@ -233,6 +239,7 @@ def main():
window[ALGO_SETTINGS_NAME].update(visible=True)
config.cam_display_id = Tab.ALGOSETTINGS
config.save()
# Otherwise, render all
for cam in cams:
+3 -2
View File
@@ -22,7 +22,7 @@ class BabbleCameraConfig(BaseModel):
gui_horizontal_flip: bool = False
class BabbleSettingsConfig(BaseModel):
gui_min_cutoff: str = "15.5004"
gui_min_cutoff: str = "10.5004"
gui_speed_coefficient: str = "0.62"
gui_osc_address: str = "127.0.0.1"
gui_osc_port: int = 8888
@@ -32,9 +32,10 @@ class BabbleSettingsConfig(BaseModel):
gui_ROSC: bool = False
gui_osc_location: str = ""
gui_multiply: int = 1
gui_model_file: str = 'Models/Effv2E44TA/'
gui_model_file: str = 'Models/MOS3E26MCJPEG/'
gui_use_gpu: bool = False
gui_inference_threads: int = 1
gui_use_red_channel: bool = False
calib_array: str = None
gui_cam_resolution_x: int = 0
gui_cam_resolution_y: int = 0
+15
View File
@@ -19,6 +19,7 @@ class SettingsWidget:
self.gui_cam_resolution_x = f"-CAMRESX{widget_id}-"
self.gui_cam_resolution_y = f"-CAMRESY{widget_id}-"
self.gui_cam_framerate = f"-CAMFRAMERATE{widget_id}-"
self.gui_use_red_channel = f"-REDCHANNEL{widget_id}-"
self.main_config = main_config
self.config = main_config.settings
self.osc_queue = osc_queue
@@ -101,6 +102,16 @@ class SettingsWidget:
sg.Text("UVC Camera Settings:", background_color='#242224'),
],
[
sg.Text("Use Red Channel", background_color='#424042'),
sg.Checkbox(
"",
default=self.config.gui_use_red_channel,
key=self.gui_use_red_channel,
background_color='#424042',
size=(0,10),
tooltip = "Uses only the red channel for Omnicept capture.",
),
sg.Text("X Resolution:", background_color='#424042'),
sg.InputText(
self.config.gui_cam_resolution_x,
@@ -226,6 +237,10 @@ class SettingsWidget:
self.config.gui_cam_framerate = int(values[self.gui_cam_framerate])
changed = True
if self.config.gui_use_red_channel != bool(values[self.gui_use_red_channel]):
self.config.gui_use_red_channel = bool(values[self.gui_use_red_channel])
changed = True
if changed:
self.main_config.save()
self.osc_queue.put((Tab.SETTINGS))
+1
View File
@@ -1,4 +1,5 @@
onnxruntime
openvino
opencv_python
Pillow
PySimpleGUI
+2 -1
View File
@@ -1,7 +1,8 @@
onnxruntime
openvino
opencv_python
Pillow
PySimpleGUI
python_osc
torch
torchvision
torchvision
+3 -3
View File
@@ -1,10 +1,10 @@
:: Example script to auto build app and make an installer
:: File paths will all need to be updated to your setup
cd C:\Users\Prohurtz\PycharmProjects\Babble_app\BabbleApp
cd X:\Documents\GitHub\ProjectBabble\BabbleApp
pyinstaller babbleapp.spec --noconfirm
cd C:\Users\Prohurtz\OneDrive\Desktop
cd C:\Users\epicm\Desktop\Build
cd C:\Program Files (x86)\Inno Setup 6
ISCC C:\Users\Prohurtz\OneDrive\Desktop\installer.iss
./ISCC X:\Documents\GitHub\ProjectBabble\scripts\installer.iss
cls
@echo off
color 0A
+5 -5
View File
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Project Babble"
#define MyAppVersion "2.0.3 BETA"
#define MyAppVersion "2.0.4 DEV"
#define MyAppPublisher "Project Babble Team"
#define MyAppURL "https://github.com/SummerSigh/ProjectBabble/tree/main"
#define MyAppExeName "Babble_App.exe"
@@ -20,11 +20,11 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:\Users\beaul\OneDrive\Desktop\output\
OutputDir=C:\Users\epicm\Desktop\Build\
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=Project_Babble-Setup
SetupIconFile=C:\Users\beaul\OneDrive\Desktop\ProjectBabble\BabbleApp\Images\logo.ico
SetupIconFile=X:\Documents\GitHub\ProjectBabble\BabbleApp\Images\logo.ico
Compression=lzma/ultra64
SolidCompression=yes
@@ -37,8 +37,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
[Files]
Source: "C:\Users\beaul\OneDrive\Desktop\ProjectBabble\BabbleApp\dist\Babble_App\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\beaul\OneDrive\Desktop\ProjectBabble\BabbleApp\dist\Babble_App\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "X:\Documents\GitHub\ProjectBabble\BabbleApp\dist\Babble_App\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "X:\Documents\GitHub\ProjectBabble\BabbleApp\dist\Babble_App\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Dirs]