bug fix : a missing bracket in calculating area_percent
@1a08293ac99d80ccbbeed07e503a133981baec03
--- README.md
+++ README.md
... | ... | @@ -1,1 +1,9 @@ |
1 | 1 |
# 2024-솔팩SW시제품 |
2 |
+ |
|
3 |
+## 구조 설명 |
|
4 |
+ |
|
5 |
+ |
|
6 |
+## 설치 |
|
7 |
+ |
|
8 |
+ |
|
9 |
+## 실행방법 |
--- hls_streaming/hls.py
+++ hls_streaming/hls.py
... | ... | @@ -130,6 +130,7 @@ |
130 | 130 |
f"Can not connect to : {self.endpoint}") |
131 | 131 |
|
132 | 132 |
def start(self): |
133 |
+ print(self.hls_url) |
|
133 | 134 |
self.receive_stream_packet = Thread(target=self.receive_stream_packet) |
134 | 135 |
self.process_thread = Thread(target=self.process_frames) |
135 | 136 |
self.receive_stream_packet.start() |
--- inference_endpoint.py
+++ inference_endpoint.py
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 |
self.mask_blob = cv2.imencode('.png', self.mask) |
111 | 111 |
self.mask_blob = self.mask.tobytes() |
112 | 112 |
self.seg_image = overlay_mask(self.image, self.mask[:,:,0], color=(0, 255, 0), alpha=0.3) |
113 |
- self.area_percent = np.sum(self.mask) / self.image.shape[0] * self.image.shape[1] |
|
113 |
+ self.area_percent = np.sum(self.mask) / (self.image.shape[0] * self.image.shape[1]) |
|
114 | 114 |
else : |
115 | 115 |
self.area_percent = 0 |
116 | 116 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?