Skip to content

Commit 44d3898

Browse files
fix: fix compiling optimized function
1 parent a8099bd commit 44d3898

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

confs/settings.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
username = 'admin'
22
password = 'just4Taqtile'
3-
camera_url = 'http://192.168.1.110:3456/onvif-http/snapshot?camera_ip=192.168.1.168'
3+
camera_url = 'http://192.168.1.110/images/192.168.1.169/snapshot.jpg'
44
server_url = 'http://127.0.0.1'
55
folder = 'images/192.168.1.163'

connection/ModelPredictionsReceiver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def predict(self, img: np.array) -> np.array:
3030
}
3131
)
3232
response.raise_for_status()
33-
return np.array(response.json().get("coordinates"))
33+
return np.array(response.json().get("coordinates")).astype(np.float32)
3434
except Exception as exc:
3535
self.logger.critical("Cannot send request to model server. Error - {}".format(exc))
36-
return np.array([])
36+
return np.array([[]])

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
logger = utils.create_logger()
2020

21-
prev_preds = None
21+
prev_preds = np.array([[]]).astype(np.float32)
2222
reporter = connection.IdleReporter(folder, server_url, configs["wait_time"], logger)
2323
image_extractor = connection.ImageHTTPExtractor(camera_url, logger, username=username, password=password)
2424
model_predictor = connection.ModelPredictionsReceiver(server_url, logger)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ pydantic==1.10.2
88
python-dotenv==1.0.0
99
PyYAML==6.0
1010
requests==2.27.1
11+
numba==0.57.1

0 commit comments

Comments
 (0)