Skip to content

KDL-Solution/DBHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Handler

This repository provides a simple utility for handling Databases(LMDB, HDF5) with images and annotations. You can store and retrieve images and their corresponding annotations efficiently using this handler.

Features

  • Store and retrieve images with annotations in database.
  • Easy-to-use functions for saving and loading data.
  • Supports encoding images using cv2 to save space.

Installation

  1. Install with pip!
pip install git+https://github.com/KDL-Solution/DBHandler

Dev

Clone the repository:

git clone https://github.com/KDL-Solution/FileHandler
cd FileHandler
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

How to Use

Uploader

#from DBHandler.uploader import LMDBUploader as Uploader
from DBHandler.uploader import HDF5Uploader as Uploader
# 이미지와 라벨 경로
data_pairs = [
    ("./data/img1.jpg", "./data/label1.json"),
    ("./data/img2.jpg", "./data/label2.json"),
    ("./data/img3.jpg", "./data/label3.json"),
    ("./data/img4.jpg", "./data/label4.json"),
    ("./data/img5.jpg", "./data/label5.json"),
]

# 업로더 생성
uploader = Uploader("test", mode='w', max_workers=10, verbose=True)

# 실행
uploader.upload(data_pairs)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published