Skip to content

Instantly share code, notes, and snippets.

View p3jitnath's full-sized avatar
:octocat:
Think Different.

Pritthijit Nath p3jitnath

:octocat:
Think Different.
View GitHub Profile
This file has been truncated, but you can view the full file.
/home/user/darknet/coco/test2017/000000466319.jpg
/home/user/darknet/coco/test2017/000000523573.jpg
/home/user/darknet/coco/test2017/000000308929.jpg
/home/user/darknet/coco/test2017/000000057540.jpg
/home/user/darknet/coco/test2017/000000579853.jpg
/home/user/darknet/coco/test2017/000000413171.jpg
/home/user/darknet/coco/test2017/000000296903.jpg
/home/user/darknet/coco/test2017/000000540552.jpg
/home/user/darknet/coco/test2017/000000186384.jpg
/home/user/darknet/coco/test2017/000000509990.jpg
@p3jitnath
p3jitnath / coco.data
Last active May 13, 2020 02:01
Google Cloud Configuration to train YOLO
classes=80
train=coco/trainvalno5k.txt
valid=coco/testdev2017.txt
names=data/coco.names
backup=backup/
eval=coco
@p3jitnath
p3jitnath / opencv-4.2.0-cuda-10.1-Ubuntu-20.04.md
Last active May 15, 2024 10:11
Step-by-Step Guide to build OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04

How to install OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04 LTS (Focal Fossa)

Install updates and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Install required libraries:

import os
DIRECTORY = 'mox_voc/'
ANNOTATION_PATH = 'MOXA/Annotations/'
IMAGES_PATH = 'MOXA/JPEGImages/'
EXTENSION = 'xml' # 'txt
NAME = 'MOXA'
# file_names = os.listdir(DIRECTORY)[:10]
file_names = os.listdir(DIRECTORY)
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
import tensorflow.compat.v1 as tf # Tensorflow 2.0 support for 1.x
os.environ['TF_CPP_MIN_LOG_LEVEL'] = 2
@p3jitnath
p3jitnath / cuda-setup.sh
Last active November 26, 2021 21:42
Setup CUDA in Ubuntu 20.04 LTS
# Nvidia Driver installation
sudo apt install nvidia-driver-440
sudo reboot
# CUDA installation
sudo apt update
sudo apt install nvidia-cuda-toolkit # Focal: version 10.1
nvcc --version
# Download cuDNN from Nvidia: https://developer.nvidia.com/rdp/cudnn-download for version 10.1
@p3jitnath
p3jitnath / driver-rtl8192eu.sh
Last active April 25, 2020 14:19
RTL8192eu Driver Installation
sudo apt-get install git linux-headers-generic build-essential dkms
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf
echo -e "8192eu\n\nloop" | sudo tee /etc/modules
echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf
sudo update-grub; sudo update-initramfs -u
systemctl reboot -i