Update documentation
This commit is contained in:
@@ -21,6 +21,8 @@ string video_pipeline(int capture_width, int capture_height, int framerate,
|
||||
"appsink";
|
||||
}
|
||||
|
||||
// Calls nvarguscamerasrc to take a 1s video at maximum resolution,
|
||||
// flips the video and then captures one image and writes it to disk.
|
||||
int main() {
|
||||
int capture_width = 3264;
|
||||
int capture_height = 2464;
|
||||
|
||||
@@ -25,6 +25,16 @@ pred = manager.dict()
|
||||
|
||||
|
||||
def get_pred():
|
||||
"""Calls the detection and classification models on current.jpg
|
||||
and stores the predictions in the global variable `pred` in the
|
||||
following format:
|
||||
{
|
||||
'image': base64 encoded image,
|
||||
'0': [state, timestamp, time since state < 3],
|
||||
'1': [state, timestamp, time since state < 3],
|
||||
⋮
|
||||
}
|
||||
"""
|
||||
tmp = deepcopy(pred)
|
||||
take_image()
|
||||
logging.debug('Starting image classification')
|
||||
@@ -41,15 +51,6 @@ def get_pred():
|
||||
'Finished drawing bounding boxes. Saving to current_bbox.jpg ...')
|
||||
cv2.imwrite('current_bbox.jpg', bbox_img)
|
||||
|
||||
# Clear superfluous bboxes if less detected
|
||||
# if len(preds) < len(pred):
|
||||
# logging.debug(
|
||||
# 'Current round contains less bboxes than previous round: old: %s\nnew: %s',
|
||||
# json.dumps(preds.copy()), json.dumps(pred.copy()))
|
||||
# for key in pred:
|
||||
# if key not in preds:
|
||||
# pred.pop(key)
|
||||
|
||||
pred.clear()
|
||||
for idx, row in preds.iterrows():
|
||||
new = []
|
||||
|
||||
Reference in New Issue
Block a user