"git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "6aa1d88b6c3f2351faeaa63d6f7592e1d9a7fa19"
Commit 2419ad3b authored by Kaushik Shivakumar's avatar Kaushik Shivakumar
Browse files

make minor fixes

parent 4d117df3
...@@ -208,7 +208,7 @@ class Ava(object): ...@@ -208,7 +208,7 @@ class Ava(object):
reader = csv.DictReader(annotations, fieldnames) reader = csv.DictReader(annotations, fieldnames)
frame_annotations = collections.defaultdict(list) frame_annotations = collections.defaultdict(list)
ids = set() ids = set()
# aggreggate by video and timestamp: # aggregate by video and timestamp:
for row in reader: for row in reader:
ids.add(row["id"]) ids.add(row["id"])
key = (row["id"], int(float(row["timestamp_seconds"]))) key = (row["id"], int(float(row["timestamp_seconds"])))
...@@ -284,15 +284,7 @@ class Ava(object): ...@@ -284,15 +284,7 @@ class Ava(object):
logging.warning("Unknown label: %s", row["action_label"]) logging.warning("Unknown label: %s", row["action_label"])
#Display the image and bounding boxes being #Display the image and bounding boxes being
#processed (for debugging purposes) #processed (for debugging purposes) if desired.
#for i in range(len(xmins)):
# cv2.rectangle(image, (int(xmins[i] * width),
# int(ymaxs[i] * height)),
# (int(xmaxs[i] * width),
# int(ymins[i] * height)), (255, 0, 0), 2)
#cv2.imshow("mywindow", image)
#cv2.waitKey(1000)
total_xmins.append(dataset_util.float_list_feature(xmins)) total_xmins.append(dataset_util.float_list_feature(xmins))
total_xmaxs.append(dataset_util.float_list_feature(xmaxs)) total_xmaxs.append(dataset_util.float_list_feature(xmaxs))
...@@ -332,7 +324,9 @@ class Ava(object): ...@@ -332,7 +324,9 @@ class Ava(object):
'region/label/string': 'region/label/string':
feature_list_feature(total_label_strings), feature_list_feature(total_label_strings),
'region/label/confidence': 'region/label/confidence':
feature_list_feature(total_confidences) feature_list_feature(total_confidences), #all ones
'region/is_annotated':
feature_list_feature(total_confidences) #all ones
} }
if len(total_xmins) > 0: if len(total_xmins) > 0:
......
...@@ -16,10 +16,12 @@ done ...@@ -16,10 +16,12 @@ done
rm "ava_file_names_trainval_v2.1.txt" rm "ava_file_names_trainval_v2.1.txt"
cd .. cd ..
#Trimming causes issues with frame seeking in the python script, so it is best left out. # Trimming causes issues with frame seeking in the python script, so it is best left out.
# If included, need to modify the python script to subtract 900 seconds wheen seeking.
#echo "Trimming all videos." #echo "Trimming all videos."
#mkdir ava_vids_trimmed #mkdir ava_vids_trimmed
#for filename in ava_vids_raw/*; do #for filename in ava_vids_raw/*; do
# ffmpeg -ss 900 -to 1800 -i $filename -c copy ava_vids_trimmed/${filename##*/} # ffmpeg -ss 900 -to 1800 -i $filename -c copy ava_vids_trimmed/${filename##*/}
#done #done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment