This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import json\n", | |
| "from pycocotools.coco import COCO\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import json\n", | |
| "from pycocotools.coco import COCO\n", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import cv2 | |
| import time | |
| cap = cv2.VideoCapture(0) | |
| FRAME_DELAY = 120 | |
| cv2.namedWindow('frame', cv2.WINDOW_FREERATIO) | |
| # cv2.setWindowProperty('frame', cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bottom_up_features, expt_flops, real_flops, gate_tensor = self.backbone(x, step_rate) | |
| File "/data/engs-tvg-depth/csbotos/miniconda3/envs/dyndet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl | |
| return forward_call(*input, **kwargs) | |
| File "/home/csbotos/github/fbscript/DynamicRouting/./dl_lib/modeling/dynamic_arch/dynamic_backbone.py", line 300, in forward | |
| self.all_cell_list[layer_index][_cell_index]( | |
| File "/data/engs-tvg-depth/csbotos/miniconda3/envs/dyndet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl | |
| return forward_call(*input, **kwargs) | |
| File "/home/csbotos/github/fbscript/DynamicRouting/./dl_lib/modeling/dynamic_arch/dynamic_cell.py", line 273, in forward | |
| result_list[2].append(h_l_down * gate_weights_beta_down) | |
| (function _print_stack) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| directory=$1 # Replace with your designated directory | |
| # Function to measure write time | |
| measure_write_time() { | |
| local file="$1" | |
| local start_time=$(date +%s%N) | |
| dd if=/dev/zero of="$file" bs=1M count=1 status=none | |
| local end_time=$(date +%s%N) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 432908 <empty> | |
| 432909 <empty> | |
| 432910 <empty> | |
| 432911 <empty> | |
| 432912 <empty> | |
| 432913 <empty> | |
| 432914 <empty> | |
| 432915 <empty> | |
| 432916 <empty> | |
| 432917 <empty> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import numpy as np | |
| import torch | |
| import torchvision.transforms.functional as F | |
| from torchvision import transforms as T | |
| from torchvision.transforms.functional import _interpolation_modes_from_int, InterpolationMode | |
| import math | |
| from torchvision.transforms.transforms import _setup_size, _log_api_usage_once | |
| from collections.abc import Sequence | |
| from typing import List, Optional, Tuple, Union |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FinalScoreAnnotator: | |
| """ | |
| 1) Adds annotations of the last values of the curves | |
| 2) Aligns the annotations of the plot to avoid overlaps using L-BFGS-B | |
| Usage: | |
| Has the same signature and functionality as the plt.plot or ax.plot | |
| """ | |
| def __init__(self, ax=None): |