Commit ebe2e368 authored by nikhil_rayaprolu's avatar nikhil_rayaprolu

Update README.md

parent f1178825
......@@ -11,7 +11,64 @@ This is an evolving dataset, where we will release more data as the dataset grow
![image1](https://i.imgur.com/zS2Nbf0.png)
# Baseline
**TODO** : @Nikhil : Please add some description of this baseline, links to MMDection paper etc.
MMdetection is an open source object detection toolbox based on PyTorch, with a large Model Zoo with many customised models that can be plugged and tested in with just a single config file modification. PYou can read more about it at: [mmdetection github](https://github.com/open-mmlab/mmdetection/)
Follow the installation instructions as given in the above link.
# Training with MMDetection:
Let us look at training MMDetection using Hybrid Task Cascade [HTC research paper](https://arxiv.org/abs/1901.07518).
A score of AP_50 of 0.526 and AR_50 of 0.729, can be achieved with Hybrid Task Cascade of Resnet50 Backbone.
MMDetection provides us with a config file especially for HTC, available at [HTC config](https://github.com/open-mmlab/mmdetection/tree/master/configs/htc)
Also make sure you have downloaded the training data to a subfolder of your project.
Modify your config file and point your dataset variables to your data folder.
As given in [MMDetection Getting Started](https://github.com/open-mmlab/mmdetection/blob/master/docs/GETTING_STARTED.md),
You can use:
python tools/train.py ${CONFIG_FILE}
to train the model on a single GPU or
./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM} [optional arguments]
to train the model on multiple GPUs.
Make sure you have edited the config file to point to the dataset and also have made changes to the number of classes.
If you are going to use the dataloader from the mmdetection.
## Testing with MMDetection:
To test your results with MMDetection,
you can use the commands:
```
*single-gpu testing*
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] [--show]
*multi-gpu testing*
./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}]
```
**Log Analysis**
The training logs can be analyzed using the plot_curve provided with the mmdetection:
```
import os
import matplotlib
%matplotlib inline
from tools.analyze_logs import plot_curve
matplotlib.rcParams['figure.figsize'] = [20, 10]
args = {
'keys':['segm_mAP_50'],
'legend':'segm_mAP_50',
'backend': None,
'json_logs': [os.getcwd()+'/work_dirs/htc_r50_fpn/20191206_105437.log.json'],
'title': 'loss'
}
print(os.getcwd()+'/work_dirs/htc_r50_fpn/20191206_105437.log.json')
plot_curve([os.getcwd()+'/work_dirs/htc_r50_fpn/20191206_105437.log.json'], args)
```
# Installation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment