Skip to content

NutNut17/detectionlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A tool repository for detection project. Read more instruction at NOTE.md

Start

Environment Setup I (Dev)

conda create -n yolo python=3.12 -y # 3.12.11
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia -y

pip install albumentations augmentation fitz

# Optional

pip install pdf2image imagehash label-studio-converter
pip install label-studio
# On label-studio proejct creation, do `Settings -> Labelling Interface -> Use image from : $url` on creating a project to enable image label on local.

pip install fiftyone
# install poppler from https://github.com/oschwartz10612/poppler-windows
# specify path of popler bin in pdf2img.py

# pip install ultralytics
# git clone https://github.com/roboflow/supervision.git 

(Ignore this) Label Studio Setup

Steps to import ultralytics dataset format

  1. Check if an image is mounted on docker and accessible at browser http://localhost:8081/data/local-files/?d=/images/00a5af01-First_073.jpg

  2. Convert to label-studio format

label-studio-converter import yolo -i "C:\Users\User\Downloads\lab\dev\datasets\finetune\batch1" -o "C:\Users\User\Downloads\lab\dev\datasets\finetune\batch1\output.json" --image-root-url "/data/local-files/?d=/images"

label-studio-converter import coco -i "datasets\finetune\finetune_dataset_v2\labels\annotation_w_offset.json" -o "datasets\finetune\finetune_dataset_v2\output.json" --image-root-url "/data/local-files/?d=/images"
label-studio-converter import coco -i "1.data/detcoco/data_v3_arrowtip/annotations/arrow_tip.json" -o "1.data/detcoco/data_v3_arrowtip/annotations/input_arrow_tip_for_label_studio.json" --image-root-url "/data/local-files/?d=/test_images"
  1. Open a project, import output.json as annotation, copy output.label_config.xml as template on label-studio configuration.

  2. Create a cloud storage on local and enter /data/image to load images

Start label-studio Server

docker run -it --name labelstudio2 -p 8081:8080 `
    -v "D:\lab\label-studio-mount\images:/label-studio/data" `
    -v "D:\lab\label-studio-mount\label_studio_data:/data" `
    -e LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true `
    -e LOCAL_FILES_SERVING_ENABLED=true `
    -e LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/data `
    -e CSRF_TRUSTED_ORIGINS=https://tunnel.nut17.com  `
    heartexlabs/label-studio:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •