Similar patches or objects in the input image(left) are grouped into same clusters, using Structural Similarity Index(SSIM). Members of the same cluster are shown with same coloured bounding boxes in the output image(right).
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 | |
from PIL import Image | |
from imageio import imsave | |
from skimage.util.shape import view_as_blocks | |
# Global shuffle key | |
map={} | |
''' | |
Args:- |
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 os, sys | |
import cv2 | |
import numpy as np | |
''' | |
Converts all images in a directory to '.npy' format. | |
Use np.save and np.load to save and load the images. | |
Use it for training your neural networks in ML/DL projects. | |
''' |
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 os, sys | |
from scipy.misc import imsave | |
import cv2 | |
import numpy as np | |
import random | |
import argparse | |
''' | |
Creates synthetic images with custom backgrounds, using the default images and masks in the dataset. |
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 | |
cap = cv2.VideoCapture(0) | |
i=1 | |
while(True): | |
# Capture frame-by-frame | |
ret, frame = cap.read() | |
# Operations on the frame |
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 caffe | |
import numpy as np | |
import cv2 | |
import Image | |
import os | |
#nvcamerasrc | |
#gst = "/dev/video1 ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)I420 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink" | |
#gst-launch-1.0 v4l2src device="/dev/video1" ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv flip-method=0 ! 'video/x-raw, format=(string)I420' ! videoconvert ! 'video/x-raw, format=(string)BGR' ! fakesink |
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
clear | |
echo -e "\e[1;4mI LOVE SHELL SCRIPTING!!\n" | |
echo -e "WELCOME \033[31m$USER to $HOSTNAME" | |
$ echo -e "\033[7m Linux OS! Best OS!! \033[0m" | |
echo "Today is `date`" | |
val=`expr 6 + 3` | |
echo "six plus three is $val" | |
echo "What is your full name?" | |
read fname | |
echo "Hello $fname, my buddy!" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Google Realtime Quickstart</title> | |
<!-- Load Styles --> | |
<link href="https://www.gstatic.com/realtime/quickstart-styles.css" rel="stylesheet" type="text/css"/> | |
<!-- Load the Realtime JavaScript library --> | |
<script src="https://apis.google.com/js/api.js"></script> |
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
# The preamble | |
set ns [new Simulator] ;#initialise the simulation | |
# Predefine tracing | |
set f [open out.tr w] | |
$ns trace-all $f | |
set nf [open out.nam w] | |
$ns namtrace-all $nf | |
NewerOlder