https://github.com/ccomkhj/mmdetection-sahi

MMDetection Support Tools for S3 and SAHI

https://github.com/ccomkhj/mmdetection-sahi

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

MMDetection Support Tools for S3 and SAHI

Basic Info
  • Host: GitHub
  • Owner: ccomkhj
  • Language: Python
  • Default Branch: main
  • Size: 9.77 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme

readme.MD

MMDetection Support Tools for S3 and SAHI

This repository provides support tools to facilitate the use of MMDetection with datasets stored in AWS S3 buckets and integration with the SAHI library for performing slice aware object detection. The tools here are designed to streamline training and inferencing pipelines by allowing direct access to data stored in S3 buckets and leveraging the powerful functionality of SAHI for handling large and high-resolution images efficiently.

Features

  • Seamless integration with AWS S3 for data storage and retrieval.
  • Support for SAHI, a library for slice-aware handling of high-resolution images in object detection tasks.
  • Easy-to-use command-line interfaces for training and inference tasks.
  • Flexible configuration options to customize the deep learning models, training parameters, and slicing strategies.

How to Use

Prerequisites

Before you begin, ensure you have the following installed: - Python 3.x - boto3 - MMDetection - SAHI

Sample Commands

Below are sample commands to run training sessions using datasets from S3 and with SAHI integration:

Training without SAHI:

bash python3 ./tools/train_with_s3_data.py \ --s3-url s3://sample_path/2024-04-08_13-00-40 \ --local-data-path ./data/2024-04-08_13-00-40 \ --config ./configs/configuration.py

Training with SAHI:

bash sh run.sh

[Note] in the configuration, follow the file structure below. ``` dataroots = [ "{{$DATASETROOT1:./data/coco/}}", "{{$DATASETROOT2:./data/coco/}}", "{{$DATASETROOT3:./data/coco/}}", "{{$DATASETROOT4:./data/coco/}}", "{{$DATASETROOT5:./data/coco/}}", "{{$DATASETROOT6:./data/coco/}}", "{{$DATASETROOT7:./data/coco/}}", "{{$DATASET_ROOT8:./data/coco/}}", ] # prepare up to 8 samples beforehand, it can go a lot higer based on the length of ConcatDataset

crop_size = (720, 720) # It is required for automatic SAHI slicing

dataroot = dataroots[-1] # to prevent error in loading config. for idx in range(num_datasets):

data_root = data_roots[idx]

train_dataset = dict(
    type=dataset_type,
    metainfo=meta_info,
    data_root=data_root,
    ann_file="train.json",
    data_prefix=dict(img="train_images"),
    filter_cfg=dict(filter_empty_gt=True, min_size=32),
    pipeline=train_pipeline,
    backend_args=None,
)

train_datasets.append(train_dataset)

traindataloader = dict( batchsize=batchsize, numworkers=batchsize * 2, persistentworkers=True, sampler=dict(type="DefaultSampler", shuffle=True), batchsampler=dict(type="AspectRatioBatchSampler"), dataset=dict(type="ConcatDataset", datasets=traindatasets), ) valdataloader = dict( batchsize=1, numworkers=2, persistentworkers=True, droplast=False, sampler=dict(type="DefaultSampler", shuffle=False), dataset=dict( type=datasettype, metainfo=metainfo, dataroot=None, annfile=dataroot + "/valsliced.json", dataprefix=dict(img=dataroot + "/valimagessliced"), testmode=True, pipeline=testpipeline, backendargs=None, ), ) valevaluator = dict( type="CocoMetric", annfile=dataroot + "/valsliced.json", metric="bbox", classwise=True, formatonly=False, backendargs=None, ) testevaluator = valevaluator testdataloader = valdataloader ```

Note

  • Ensure that the --s3-url is correctly pointing to your dataset's location within the S3 bucket.
  • Modify the --config flag with the path to your own training configuration file as required.
  • To handle multiple COCO dataset, I maintain GUI-managetool cvOps. Feel free to utilize.

Owner

  • Name: Huijo
  • Login: ccomkhj
  • Kind: user
  • Location: Germany
  • Company: @hexafarms

Self Learner

GitHub Events

Total
Last Year

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 2
  • Total Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
ccomkhj c****j@g****m 2

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels