From b1270277114be2779030e0bb7f3558dcdc35d883 Mon Sep 17 00:00:00 2001 From: Erik Ziegler Date: Fri, 10 Jan 2020 02:17:54 +0100 Subject: [PATCH] Add requirements.txt for websocket. --- requirements.txt | 2 ++ websocket.py | 17 ++++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4097274 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +waymo-open-dataset-tf-2-0-0==1.0.1 +websockets==8.1 \ No newline at end of file diff --git a/websocket.py b/websocket.py index 76a381f..d71157a 100644 --- a/websocket.py +++ b/websocket.py @@ -1,24 +1,19 @@ -import argparse -import json -import logging import tensorflow as tf import numpy as np -from functools import partial -import math -import os -import json import asyncio +import os import re import websockets - -print(f"Tensorflow Version: {tf.__version__}") +import argparse from waymo_open_dataset.utils import frame_utils, box_utils, transform_utils from waymo_open_dataset import dataset_pb2 as open_dataset +print(f"Tensorflow Version: {tf.__version__}") + global_settings = dict() global_settings['segments_dir'] = '' -global_settings['label_points'] = False +global_settings['label_points'] = True def get_segment_id(segment_filename): return re.search('\w+-(\d+)_.*', segment_filename).group(1) @@ -208,7 +203,7 @@ async def server(websocket, path): parser.add_argument('--segments-dir', type=str, required=True, help='Directory containing the segments (.tfrecord files) to serve.') - parser.add_argument('--label-points', action='store_true', default=False, + parser.add_argument('--label-points', action='store_true', default=True, help='Whether or not to convert label bounding boxes to point labels (takes more computation time).') parser.add_argument('--port', type=str, default=9000, help='Port to run the websocket server on.')