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.
Files changed (57) hide show
  1. {arcjetcv-1.1.0.dev5/arcjetcv.egg-info → arcjetcv-1.1.2}/PKG-INFO +24 -8
  2. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/README.md +12 -6
  3. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/README_pypi.md +12 -6
  4. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/cnn.py +16 -6
  5. arcjetcv-1.1.2/arcjetCV/segmentation/contour/conversion.py +27 -0
  6. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2/arcjetcv.egg-info}/PKG-INFO +24 -8
  7. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/SOURCES.txt +1 -0
  8. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/setup.py +1 -1
  9. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/LICENSE +0 -0
  10. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/MANIFEST.in +0 -0
  11. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/__init__.py +0 -0
  12. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/__init__.py +0 -0
  13. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibrate_video.py +0 -0
  14. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_controller.py +0 -0
  15. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_main.py +0 -0
  16. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_model.py +0 -0
  17. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/calibration_view.py +0 -0
  18. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/chessboard_pattern.png +0 -0
  19. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/detetct_example.py +0 -0
  20. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/rotated_pattern.png +0 -0
  21. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/calibration/test.py +0 -0
  22. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/chessboard_pattern.png +0 -0
  23. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/__init__.py +0 -0
  24. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/_arcjetCV_gui.py +0 -0
  25. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/arcjetCV_gui.py +0 -0
  26. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/custom_classes.py +0 -0
  27. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
  28. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
  29. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
  30. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
  31. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/main.py +0 -0
  32. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/gui/main_window.py +0 -0
  33. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/__init__.py +0 -0
  34. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/__init__.py +0 -0
  35. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/contour/contour.py +0 -0
  36. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/time/__init__.py +0 -0
  37. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/segmentation/time/time_segmentation.py +0 -0
  38. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/__init__.py +0 -0
  39. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/logger.py +0 -0
  40. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/output.py +0 -0
  41. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/processor.py +0 -0
  42. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/utils.py +0 -0
  43. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetCV/utils/video.py +0 -0
  44. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/dependency_links.txt +0 -0
  45. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/entry_points.txt +0 -0
  46. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/requires.txt +0 -0
  47. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/arcjetcv.egg-info/top_level.txt +0 -0
  48. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/setup.cfg +0 -0
  49. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/README.md +0 -0
  50. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/__init__.py +0 -0
  51. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/chessboard_pattern.png +0 -0
  52. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_calibration_functions.py +0 -0
  53. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_calibration_gui.py +0 -0
  54. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_functions.py +0 -0
  55. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_gui.py +0 -0
  56. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_obj_models.py +0 -0
  57. {arcjetcv-1.1.0.dev5 → arcjetcv-1.1.2}/tests/test_segmentation.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: arcjetcv
3
- Version: 1.1.0.dev5
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
  [![GitHub Docs](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://magnus-haw.github.io/arcjetCV/)
31
41
  [![PyPI version](https://badge.fury.io/py/arcjetcv.svg)](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://arxiv.org/abs/2404.11492):
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{arcjetCV,
150
- title={arcjetCV: an open-source software to analyze material ablation},
151
- author={Quintart, Alexandre and Haw, Magnus and Semeraro, Federico},
152
- journal={arXiv preprint arXiv:2404.11492},
153
- year={2024}
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://arxiv.org/abs/2404.11492):
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{arcjetCV,
120
- title={arcjetCV: an open-source software to analyze material ablation},
121
- author={Quintart, Alexandre and Haw, Magnus and Semeraro, Federico},
122
- journal={arXiv preprint arXiv:2404.11492},
123
- year={2024}
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://arxiv.org/abs/2404.11492):
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{arcjetCV,
121
- title={arcjetCV: an open-source software to analyze material ablation},
122
- author={Quintart, Alexandre and Haw, Magnus and Semeraro, Federico},
123
- journal={arXiv preprint arXiv:2404.11492},
124
- year={2024}
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
- # predict fails from GUI (Could not load library libcudnn_ops_infer.so), works from script. Fix: run it cpu only
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(Path("Unet-xception_25_original.pt"))
16
+ .joinpath("Unet-xception_25_weights_only.pt")
18
17
  )
19
- self.model = torch.load(self.checkpoint_path, map_location=self.device)
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
1
+ Metadata-Version: 2.4
2
2
  Name: arcjetcv
3
- Version: 1.1.0.dev5
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
  [![GitHub Docs](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://magnus-haw.github.io/arcjetCV/)
31
41
  [![PyPI version](https://badge.fury.io/py/arcjetcv.svg)](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://arxiv.org/abs/2404.11492):
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{arcjetCV,
150
- title={arcjetCV: an open-source software to analyze material ablation},
151
- author={Quintart, Alexandre and Haw, Magnus and Semeraro, Federico},
152
- journal={arXiv preprint arXiv:2404.11492},
153
- year={2024}
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.0.dev5", # Set the version directly here
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