arcjetCV 1.1.0.dev5__tar.gz → 1.1.2__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.0.dev5/arcjetcv.egg-info → arcjetcv-1.1.2}/PKG-INFO +24 -8
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/README.md +12 -6
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/README_pypi.md +12 -6
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/cnn.py +16 -6
- arcjetcv-1.1.2/arcjetCV/segmentation/contour/conversion.py +27 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2/arcjetcv.egg-info}/PKG-INFO +24 -8
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/SOURCES.txt +1 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/setup.py +1 -1
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/LICENSE +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/MANIFEST.in +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibrate_video.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_controller.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_main.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_model.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_view.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/detetct_example.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/rotated_pattern.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/test.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/_arcjetCV_gui.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/arcjetCV_gui.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/custom_classes.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/main.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/main_window.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/contour.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/time/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/time/time_segmentation.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/logger.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/output.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/processor.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/utils.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/video.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/dependency_links.txt +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/entry_points.txt +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/requires.txt +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/top_level.txt +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/setup.cfg +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/README.md +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/__init__.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_calibration_functions.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_calibration_gui.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_functions.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_gui.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_obj_models.py +0 -0
- {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_segmentation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: arcjetcv
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Package to process arcjet videos and segment the edge of the shock and of the sample
|
|
5
5
|
Home-page: https://github.com/magnus-haw/arcjetCV
|
|
6
6
|
Author: arcjetCV team
|
|
@@ -26,6 +26,16 @@ Requires-Dist: scikit-learn
|
|
|
26
26
|
Requires-Dist: segmentation-models-pytorch
|
|
27
27
|
Requires-Dist: torch
|
|
28
28
|
Requires-Dist: torchvision
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: platform
|
|
36
|
+
Dynamic: project-url
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: summary
|
|
29
39
|
|
|
30
40
|
[](https://magnus-haw.github.io/arcjetCV/)
|
|
31
41
|
[](https://pypi.org/project/arcjetcv/)
|
|
@@ -143,14 +153,20 @@ python test.py
|
|
|
143
153
|
|
|
144
154
|
## Citing
|
|
145
155
|
|
|
146
|
-
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://
|
|
156
|
+
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://doi.org/10.2514/1.A36132):
|
|
147
157
|
|
|
148
158
|
```BibTeX
|
|
149
|
-
@article{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
@article{doi:10.2514/1.A36132,
|
|
160
|
+
author = {Quintart, Alexandre M. and Haw, Magnus A. and Semeraro, Federico},
|
|
161
|
+
title = {arcjetCV: Open-Source Software to Analyze Material Ablation},
|
|
162
|
+
journal = {Journal of Spacecraft and Rockets},
|
|
163
|
+
volume = {0},
|
|
164
|
+
number = {0},
|
|
165
|
+
pages = {1-10},
|
|
166
|
+
year = {0},
|
|
167
|
+
doi = {10.2514/1.A36132},
|
|
168
|
+
URL = {https://doi.org/10.2514/1.A36132},
|
|
169
|
+
eprint = {https://doi.org/10.2514/1.A36132}
|
|
154
170
|
}
|
|
155
171
|
```
|
|
156
172
|
|
|
@@ -113,14 +113,20 @@ python test.py
|
|
|
113
113
|
|
|
114
114
|
## Citing
|
|
115
115
|
|
|
116
|
-
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://
|
|
116
|
+
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://doi.org/10.2514/1.A36132):
|
|
117
117
|
|
|
118
118
|
```BibTeX
|
|
119
|
-
@article{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
@article{doi:10.2514/1.A36132,
|
|
120
|
+
author = {Quintart, Alexandre M. and Haw, Magnus A. and Semeraro, Federico},
|
|
121
|
+
title = {arcjetCV: Open-Source Software to Analyze Material Ablation},
|
|
122
|
+
journal = {Journal of Spacecraft and Rockets},
|
|
123
|
+
volume = {0},
|
|
124
|
+
number = {0},
|
|
125
|
+
pages = {1-10},
|
|
126
|
+
year = {0},
|
|
127
|
+
doi = {10.2514/1.A36132},
|
|
128
|
+
URL = {https://doi.org/10.2514/1.A36132},
|
|
129
|
+
eprint = {https://doi.org/10.2514/1.A36132}
|
|
124
130
|
}
|
|
125
131
|
```
|
|
126
132
|
|
|
@@ -114,14 +114,20 @@ python test.py
|
|
|
114
114
|
|
|
115
115
|
## Citing
|
|
116
116
|
|
|
117
|
-
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://
|
|
117
|
+
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://doi.org/10.2514/1.A36132):
|
|
118
118
|
|
|
119
119
|
```BibTeX
|
|
120
|
-
@article{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
@article{doi:10.2514/1.A36132,
|
|
121
|
+
author = {Quintart, Alexandre M. and Haw, Magnus A. and Semeraro, Federico},
|
|
122
|
+
title = {arcjetCV: Open-Source Software to Analyze Material Ablation},
|
|
123
|
+
journal = {Journal of Spacecraft and Rockets},
|
|
124
|
+
volume = {0},
|
|
125
|
+
number = {0},
|
|
126
|
+
pages = {1-10},
|
|
127
|
+
year = {0},
|
|
128
|
+
doi = {10.2514/1.A36132},
|
|
129
|
+
URL = {https://doi.org/10.2514/1.A36132},
|
|
130
|
+
eprint = {https://doi.org/10.2514/1.A36132}
|
|
125
131
|
}
|
|
126
132
|
```
|
|
127
133
|
|
|
@@ -2,21 +2,31 @@ import torch
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
import cv2
|
|
4
4
|
from torchvision import transforms as T
|
|
5
|
+
import segmentation_models_pytorch as smp
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class CNN:
|
|
8
9
|
def __init__(self):
|
|
9
|
-
#
|
|
10
|
-
self.device = torch.device(
|
|
11
|
-
"cpu"
|
|
12
|
-
) # torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
|
10
|
+
# Automatically choose GPU if available
|
|
11
|
+
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
13
12
|
|
|
14
13
|
self.checkpoint_path = (
|
|
15
14
|
Path(__file__)
|
|
16
15
|
.parent.absolute()
|
|
17
|
-
.joinpath(
|
|
16
|
+
.joinpath("Unet-xception_25_weights_only.pt")
|
|
18
17
|
)
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
self.model = smp.Unet(
|
|
20
|
+
encoder_name="xception",
|
|
21
|
+
encoder_weights=None,
|
|
22
|
+
classes=4, # match saved model
|
|
23
|
+
activation=None,
|
|
24
|
+
)
|
|
25
|
+
self.model.load_state_dict(
|
|
26
|
+
torch.load(self.checkpoint_path, map_location=self.device)
|
|
27
|
+
)
|
|
28
|
+
self.model.to(self.device)
|
|
29
|
+
self.model.eval()
|
|
20
30
|
|
|
21
31
|
self.mean = [0.485, 0.456, 0.406]
|
|
22
32
|
self.std = [0.229, 0.224, 0.225]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import torch
|
|
2
|
+
import segmentation_models_pytorch as smp
|
|
3
|
+
|
|
4
|
+
# Match these to your original training setup
|
|
5
|
+
encoder = "xception"
|
|
6
|
+
num_classes = 4
|
|
7
|
+
checkpoint_in = "Unet-xception_25_original.pt"
|
|
8
|
+
checkpoint_out = "Unet-xception_25_weights_only.pt"
|
|
9
|
+
|
|
10
|
+
# Rebuild the model architecture
|
|
11
|
+
model = smp.Unet(
|
|
12
|
+
encoder_name=encoder,
|
|
13
|
+
encoder_weights=None, # or "imagenet" if used in training
|
|
14
|
+
classes=num_classes,
|
|
15
|
+
activation=None,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
# Load full model that was saved with torch.save(model)
|
|
19
|
+
model_full = torch.load(checkpoint_in, map_location="cpu")
|
|
20
|
+
|
|
21
|
+
# Copy weights from full model to new instance
|
|
22
|
+
model.load_state_dict(model_full.state_dict())
|
|
23
|
+
|
|
24
|
+
# Save only the state_dict
|
|
25
|
+
torch.save(model.state_dict(), checkpoint_out)
|
|
26
|
+
|
|
27
|
+
print(f"✔ Model successfully converted and saved to '{checkpoint_out}'")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: arcjetcv
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Package to process arcjet videos and segment the edge of the shock and of the sample
|
|
5
5
|
Home-page: https://github.com/magnus-haw/arcjetCV
|
|
6
6
|
Author: arcjetCV team
|
|
@@ -26,6 +26,16 @@ Requires-Dist: scikit-learn
|
|
|
26
26
|
Requires-Dist: segmentation-models-pytorch
|
|
27
27
|
Requires-Dist: torch
|
|
28
28
|
Requires-Dist: torchvision
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: platform
|
|
36
|
+
Dynamic: project-url
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: summary
|
|
29
39
|
|
|
30
40
|
[](https://magnus-haw.github.io/arcjetCV/)
|
|
31
41
|
[](https://pypi.org/project/arcjetcv/)
|
|
@@ -143,14 +153,20 @@ python test.py
|
|
|
143
153
|
|
|
144
154
|
## Citing
|
|
145
155
|
|
|
146
|
-
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://
|
|
156
|
+
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://doi.org/10.2514/1.A36132):
|
|
147
157
|
|
|
148
158
|
```BibTeX
|
|
149
|
-
@article{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
@article{doi:10.2514/1.A36132,
|
|
160
|
+
author = {Quintart, Alexandre M. and Haw, Magnus A. and Semeraro, Federico},
|
|
161
|
+
title = {arcjetCV: Open-Source Software to Analyze Material Ablation},
|
|
162
|
+
journal = {Journal of Spacecraft and Rockets},
|
|
163
|
+
volume = {0},
|
|
164
|
+
number = {0},
|
|
165
|
+
pages = {1-10},
|
|
166
|
+
year = {0},
|
|
167
|
+
doi = {10.2514/1.A36132},
|
|
168
|
+
URL = {https://doi.org/10.2514/1.A36132},
|
|
169
|
+
eprint = {https://doi.org/10.2514/1.A36132}
|
|
154
170
|
}
|
|
155
171
|
```
|
|
156
172
|
|
|
@@ -29,6 +29,7 @@ arcjetCV/segmentation/__init__.py
|
|
|
29
29
|
arcjetCV/segmentation/contour/__init__.py
|
|
30
30
|
arcjetCV/segmentation/contour/cnn.py
|
|
31
31
|
arcjetCV/segmentation/contour/contour.py
|
|
32
|
+
arcjetCV/segmentation/contour/conversion.py
|
|
32
33
|
arcjetCV/segmentation/time/__init__.py
|
|
33
34
|
arcjetCV/segmentation/time/time_segmentation.py
|
|
34
35
|
arcjetCV/utils/__init__.py
|
|
@@ -66,7 +66,7 @@ check_linux_dependencies()
|
|
|
66
66
|
# Define the setup configuration
|
|
67
67
|
setup(
|
|
68
68
|
name="arcjetcv",
|
|
69
|
-
version="1.1.
|
|
69
|
+
version="1.1.2", # 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,
|
|
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
|