arcjetCV 1.1.4.dev4__tar.gz → 1.1.4.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arcjetcv-1.1.4.dev4/arcjetcv.egg-info → arcjetcv-1.1.4.dev6}/PKG-INFO +1 -1
- arcjetcv-1.1.4.dev6/arcjetCV/segmentation/contour/model_loader.py +76 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6/arcjetcv.egg-info}/PKG-INFO +1 -1
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/setup.py +1 -1
- arcjetcv-1.1.4.dev4/arcjetCV/segmentation/contour/model_loader.py +0 -19
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/LICENSE +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/MANIFEST.in +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/README.md +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/README_pypi.md +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/calibrate_video.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/calibration_controller.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/calibration_main.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/calibration_model.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/calibration_view.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/detetct_example.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/rotated_pattern.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/calibration/test.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/_arcjetCV_gui.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/arcjetCV_gui.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/custom_classes.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/main.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/gui/main_window.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/contour/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/contour/cnn.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/contour/contour.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/contour/conversion.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/time/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/segmentation/time/time_segmentation.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/logger.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/output.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/processor.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/utils.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetCV/utils/video.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetcv.egg-info/SOURCES.txt +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetcv.egg-info/dependency_links.txt +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetcv.egg-info/entry_points.txt +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetcv.egg-info/requires.txt +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/arcjetcv.egg-info/top_level.txt +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/setup.cfg +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/README.md +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/__init__.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_calibration_functions.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_calibration_gui.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_functions.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_gui.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_obj_models.py +0 -0
- {arcjetcv-1.1.4.dev4 → arcjetcv-1.1.4.dev6}/tests/test_segmentation.py +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import urllib.request
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import os
|
|
4
|
+
from PySide6.QtWidgets import (
|
|
5
|
+
QApplication,
|
|
6
|
+
QMessageBox,
|
|
7
|
+
QDialog,
|
|
8
|
+
QVBoxLayout,
|
|
9
|
+
QLabel,
|
|
10
|
+
QProgressBar,
|
|
11
|
+
)
|
|
12
|
+
from PySide6.QtCore import Qt, QThread, Signal
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class DownloadThread(QThread):
|
|
16
|
+
progress = Signal(int)
|
|
17
|
+
error = Signal(str)
|
|
18
|
+
finished = Signal()
|
|
19
|
+
|
|
20
|
+
def __init__(self, url, output_path):
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.url = url
|
|
23
|
+
self.output_path = output_path
|
|
24
|
+
|
|
25
|
+
def run(self):
|
|
26
|
+
try:
|
|
27
|
+
|
|
28
|
+
def reporthook(blocknum, blocksize, totalsize):
|
|
29
|
+
readsofar = blocknum * blocksize
|
|
30
|
+
percent = int(readsofar * 100 / totalsize) if totalsize > 0 else 0
|
|
31
|
+
self.progress.emit(min(percent, 100))
|
|
32
|
+
|
|
33
|
+
urllib.request.urlretrieve(self.url, self.output_path, reporthook)
|
|
34
|
+
self.finished.emit()
|
|
35
|
+
except Exception as e:
|
|
36
|
+
self.error.emit(str(e))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DownloadPopup(QDialog):
|
|
40
|
+
def __init__(self, url, output_path):
|
|
41
|
+
super().__init__()
|
|
42
|
+
self.setWindowTitle("Downloading Model Weights")
|
|
43
|
+
self.setWindowFlags(self.windowFlags() | Qt.CustomizeWindowHint)
|
|
44
|
+
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
|
|
45
|
+
|
|
46
|
+
self.layout = QVBoxLayout()
|
|
47
|
+
self.label = QLabel("Downloading model weights, please wait...")
|
|
48
|
+
self.progress_bar = QProgressBar()
|
|
49
|
+
self.progress_bar.setRange(0, 100)
|
|
50
|
+
self.layout.addWidget(self.label)
|
|
51
|
+
self.layout.addWidget(self.progress_bar)
|
|
52
|
+
self.setLayout(self.layout)
|
|
53
|
+
|
|
54
|
+
self.thread = DownloadThread(url, output_path)
|
|
55
|
+
self.thread.progress.connect(self.progress_bar.setValue)
|
|
56
|
+
self.thread.error.connect(self.show_error)
|
|
57
|
+
self.thread.finished.connect(self.accept)
|
|
58
|
+
self.thread.start()
|
|
59
|
+
|
|
60
|
+
def show_error(self, message):
|
|
61
|
+
QMessageBox.critical(self, "Download Failed", f"❌ {message}")
|
|
62
|
+
self.reject()
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def get_model_checkpoint():
|
|
66
|
+
model_name = "Unet-xception_25_weights_only.pt"
|
|
67
|
+
checkpoint_path = Path(__file__).parent / model_name
|
|
68
|
+
if not checkpoint_path.exists():
|
|
69
|
+
url = "https://github.com/magnus-haw/arcjetCV/raw/main/arcjetCV/segmentation/contour/Unet-xception_25_weights_only.pt"
|
|
70
|
+
|
|
71
|
+
app = QApplication.instance() or QApplication([])
|
|
72
|
+
popup = DownloadPopup(url, str(checkpoint_path))
|
|
73
|
+
if not popup.exec():
|
|
74
|
+
raise RuntimeError("Download canceled or failed.")
|
|
75
|
+
|
|
76
|
+
return checkpoint_path
|
|
@@ -66,7 +66,7 @@ check_linux_dependencies()
|
|
|
66
66
|
# Define the setup configuration
|
|
67
67
|
setup(
|
|
68
68
|
name="arcjetcv",
|
|
69
|
-
version="1.1.4.
|
|
69
|
+
version="1.1.4.dev6", # Set the version directly here
|
|
70
70
|
author="arcjetCV team",
|
|
71
71
|
description="Package to process arcjet videos and segment the edge of the shock and of the sample",
|
|
72
72
|
long_description=long_description,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import urllib.request
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def get_model_checkpoint():
|
|
7
|
-
print("Checking the model checkpoint")
|
|
8
|
-
model_name = "Unet-xception_25_weights_only.pt"
|
|
9
|
-
checkpoint_path = Path(__file__).parent / model_name
|
|
10
|
-
|
|
11
|
-
if not checkpoint_path.exists():
|
|
12
|
-
print(f"[INFO] Downloading model weights to {checkpoint_path}...")
|
|
13
|
-
url = "https://github.com/magnus-haw/arcjetCV/raw/main/arcjetCV/segmentation/contour/Unet-xception_25_weights_only.pt"
|
|
14
|
-
try:
|
|
15
|
-
urllib.request.urlretrieve(url, checkpoint_path)
|
|
16
|
-
except Exception as e:
|
|
17
|
-
raise RuntimeError(f"❌ Failed to download model weights: {e}")
|
|
18
|
-
|
|
19
|
-
return checkpoint_path
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|