Skip to content

Commit

Permalink
Fix error with taichi-downloading.
Browse files Browse the repository at this point in the history
  • Loading branch information
abcdea committed Feb 21, 2020
1 parent 8b16d29 commit 375e655
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/taichi-loading/load_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def run(data):
for entry in all_chunks_dict:
if (i * ref_fps >= entry['start'] * fps) and (i * ref_fps < entry['end'] * fps):
left, top, right, bot = entry['bbox']
left = int(left * (ref_width / frame.shape[1]))
top = int(top * (ref_height / frame.shape[0]))
right = int(right * (ref_width / frame.shape[1]))
bot = int(bot * (ref_height / frame.shape[0]))
left = int(left / (ref_width / frame.shape[1]))
top = int(top / (ref_height / frame.shape[0]))
right = int(right / (ref_width / frame.shape[1]))
bot = int(bot / (ref_height / frame.shape[0]))
crop = frame[top:bot, left:right]
if args.image_shape is not None:
crop = img_as_ubyte(resize(crop, args.image_shape, anti_aliasing=True))
Expand Down

1 comment on commit 375e655

@sno925879
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I fix the error in taichi downloading

Please sign in to comment.