Skip to content

Instantly share code, notes, and snippets.

View fig.tex
\begin{figure}[t]
\begin{center}
\includegraphics[width=1in,height=1in]{images/flute.png}
\hspace{0.1cm}
\includegraphics[width=1in,height=1in]{pictures/adv12.png}
\hspace{0.1cm}
\includegraphics[width=1in,height=1in]{images/carpenter_kit.png}
\end{center}
\begin{center}
View fig.tex
\begin{figure*}
\begin{center}
\includegraphics[width=3.132in,height=2.349in]{Figure_1-11.png}
\hspace{0.2cm}
\includegraphics[width=3.132in,height=2.349in]{Figure_1-6.png}
\end{center}
\begin{center}
\caption{A. (left) Ratio of $i^{th}$ singular value to first singular value of matrix $P$ containing example-wise adversarial perturbations. B. (right) Cosine similarity of our universal perturbation for class '0' with singular vectors of matrix $P$.}
View fig.tex
\begin{figure*}[t]
\begin{center}
\includegraphics[width=1.4in,height=1.4in]{pictures/vgg16_envelope.png}
\hspace{0.2cm}
\includegraphics[width=1.4in,height=1.4in]{pictures/vgg16_horsecart.png}
\hspace{0.2cm}
\includegraphics[width=1.4in,height=1.4in]{pictures/vgg16_tablelamp.png}
\end{center}
\begin{center}
@tejus-gupta
tejus-gupta / setup.sh
Last active Oct 10, 2018
Download dataset and training code for tensorpad
View setup.sh
mkdir train_set
cd train_set
wget https://gist.githubusercontent.com/tejus-gupta/3d4564e624cad79691706a5c1303f4c6/raw/3cafe4877f981e3f3c481727d0a90db519a4e95b/download.py
python download.py
unzip -qq masks.zip
unzip -qq train_data.zip
cd ..
git clone https://github.com/tejus-gupta/Segmentation
cd Segmentation
git checkout modelD
View debug.py
import os
import sys
import yaml
import time
import shutil
import torch
import random
import argparse
import datetime
import numpy as np
View debug_dataloader.py
import os
import sys
import yaml
import time
import shutil
import torch
import random
import argparse
import datetime
import numpy as np
View remove.py
to_remove = []
for class_idx in selected_classes:
if np.sum(y_train[:, class_idx] < 0.5) < 5 or np.sum(y_train[:, class_idx] > 0.5) < 5:
to_remove.append(class_idx)
for class_idx in to_remove:
selected_classes.remove(class_idx)
print('Removed classes with too few examples')
View example.launch
<launch>
<!--
NOTE: You'll need to bring up something that publishes sensor data (see
rosstage), something that publishes a map (see map_server), and something to
visualize a costmap (see nav_view), to see things work.
Also, on a real robot, you'd want to set the "use_sim_time" parameter to false, or just not set it.
-->
<param name="/use_sim_time" value="true"/>
View read.py
if message_type == 'user_read':
key,_ = data.split('|')
highest_version = -1
highest_version_value = ''
#nodes = random.sample([(hash(key)+i)%N for i in range(R)], Q_r)
#nodes = random.sample(get_next_live_inc(hash(key), R), Q_r)
nodes = get_next_live_inc(hash(key), R)
@tejus-gupta
tejus-gupta / summary.md
Last active Dec 12, 2019
Google Summer of Code - 2017
View summary.md

Project Abstract

I proposed to

  1. Add a package for image segmentation as part of JuliaImages with several algorithms -
  • Thresholding - Otsu’s method and Adaptive thresholding
  • K-means clustering
  • Mean shift segmentation
  • Watershed segmentation
  • Felzenszwalb's efficient region merging algorithm
  • Shi and Malik’s normalized graph-cut based segmentation