윤영준 윤영준 06-10
bug fix : a missing bracket in calculating area_percent
@1a08293ac99d80ccbbeed07e503a133981baec03
README.md
--- README.md
+++ README.md
@@ -1,1 +1,9 @@
 # 2024-솔팩SW시제품
+
+## 구조 설명
+
+
+## 설치
+
+
+## 실행방법
hls_streaming/hls.py
--- hls_streaming/hls.py
+++ hls_streaming/hls.py
@@ -130,6 +130,7 @@
                   f"Can not connect to : {self.endpoint}")
 
     def start(self):
+        print(self.hls_url)
         self.receive_stream_packet = Thread(target=self.receive_stream_packet)
         self.process_thread = Thread(target=self.process_frames)
         self.receive_stream_packet.start()
inference_endpoint.py
--- inference_endpoint.py
+++ inference_endpoint.py
@@ -110,7 +110,7 @@
             self.mask_blob = cv2.imencode('.png', self.mask)
             self.mask_blob = self.mask.tobytes()
             self.seg_image = overlay_mask(self.image, self.mask[:,:,0], color=(0, 255, 0), alpha=0.3)
-            self.area_percent = np.sum(self.mask) / self.image.shape[0] * self.image.shape[1]
+            self.area_percent = np.sum(self.mask) / (self.image.shape[0] * self.image.shape[1])
         else :
             self.area_percent = 0
 
Add a comment
List