Human detection program for Inria Person Dataset
Download by git
git clone https://github.com/rupy/HumanDetection.git
or you can download as zip file from https://github.com/rupy/HumanDetection/archive/master.zip.
You need environment like:
Python 2.7
OpenCV 2.4.9
Numpy 1.9.1
PyYAML 3.11
PySide 1.2.2
If you don't have Numpy and PyYAML, you can install these by pip like:
$ pip install numpy
$ pip install pyyaml
$ pip install pyside
Edit configure file, config.yml for your own file system. output directories are automatically created by program. Inria Person Dataset is in http://pascal.inrialpes.fr/data/human/.
Annotation Generator is a GUI tool to generate annotation information for each image to learn dataset by opencv_traincascade. You don't need to use this class if you use Inria Person Dataset because it has annotation information in it. This program is for the dataset which has no annotation informations.
You can create region information of objects to be detected. To use this class, you have to change config.yml for your own file system as follow:
- pos_img_dir: Directory contains images to add annotations.
- my_annotation_dir: Directory to save annotation infomations as pickle file. This directory is automatically created.
- my_annotation_img_dir: Directory to save sample annotated images. This directory is automatically created.
Write code as follow:
from annotation_generator import AnnotationGenerator
# log level setting
logging.root.setLevel(level=logging.INFO)
# initialize AnnotationGenerator
generator = AnnotationGenerator()
# Do annotation work by GUI
# if given True, generator skips file you already added annotations(default).
# if given False, you can edit file you already added annotations.
generator.generate_annotations(True)
# create positive.dat for opencv
generator.create_positive_dat()
or just run python like this:
$ python annotation_generator.py
Drag point to point in image to create regions. You can use keys as follow:
- [d] key: Delete a region added last.
- [space] key: Save regions as pickle & go to next image.
- [q] key: Quit annotation work.
You can quit annotation work anytime. You can start from the image you quit brefore if you give True to generate_annotations().
Annotation GUI is a GUI tool to generate annotation information for each image to learn dataset by opencv_traincascade. You don't need to use this class if you use Inria Person Dataset because it has annotation information in it. This program is for the dataset which has no annotation informations.
You can create region information of objects to be detected. To use this class, you have to change config.yml for your own file system as follow:
- pos_img_dir: Directory contains images to add annotations.
- my_annotation_dir: Directory to save annotation infomations as pickle file. This directory is automatically created.
- my_annotation_img_dir: Directory to save sample annotated images. This directory is automatically created.
Write code as follow:
from annotation_gui import AnnotationGUI
# log level setting
logging.root.setLevel(level=logging.INFO)
# run app
app = QtGui.QApplication(sys.argv)
ag = AnnotationGUI()
ag.show()
sys.exit(app.exec_())
or just run python like this:
$ python annotation_gui.py
First, choose file name from list, then image will be loaded. Drag point to point in image to create regions. You can save and undo by button. Green icon in the list shows file has annotation information already and red shows no information.
humandetection's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.