Skip to content

niovl/roi_layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Roi Layout & Bbox Map)

Redeploy the roi extracted from the large image to the small image.

Description

In the field of computer vision, there is often too much redundant information in large images. After preprocessing, the areas of human interest are relatively scattered, which is not conducive to centralized processing. We redeploy these areas to facilitate subsequent centralized processing.

note

Getting Started

python 3.5

C++

  • 1.Building && run
# opencv == 3.3.1
$ mkdir build && cd build
$ cmake .. && make -j8
$ ../bin/roi_layout
  • How to get layout rects? use get_layout().
  • How to get layout image? use get_layout_mat().
  • How to infer layout result? use TryLayout().
  • How to map box in layout image to orignal image? use MapLayoutBoxToROI().

If you want to get a different deployment shape, just fix the following sentence in file.

  /**
   * ROI_layout.cpp
   * void ROILayout::FindBestLocation(Rect &rect)
  **/
  float score = ratio_wh * ratio_area;  // Can be customized.

TODO

  • C++ version adds gap
  • Support merge Adjacent rectangle
  • Replace IOU with CIOU
  • Expand rectangle

License License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Citation

Please cite roi-layout in your publications if it helps your research:

@misc{roi_layout,
    Author = {niovl},
    Title = {{roi-layout: Redeploy the roi Extracted From the Large Image To the Small Image.}},
    Howpublished = {\url{https://github.com/niovl/roi_layout}},
    Year = {2020}
}