Skip to content

Commit

Permalink
Add requirements.txt for websocket.
Browse files Browse the repository at this point in the history
  • Loading branch information
erksch committed Jan 10, 2020
1 parent 39c1c80 commit b127027
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
waymo-open-dataset-tf-2-0-0==1.0.1
websockets==8.1
17 changes: 6 additions & 11 deletions websocket.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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.')
Expand Down

0 comments on commit b127027

Please sign in to comment.