Emacs
来源:互联网 发布:java 回文字符串 编辑:程序博客网 时间:2024/06/06 07:35
批量转换KITTI数据集到VOC的方法
1.Emacs法
2.Matlab法
-----------------------------------------------------------------------------------------------------------------------------------------------------------
1.Emacs法
http://www.cnblogs.com/linkboy1980/p/6527394.html
内容需要更改
改schema为
(setq etxml-KITTI-dataset-schema "(\"object\" (\"name\" @0@)(\"pose\" 0)(\"truncated\" (round-with-threshold (string-to-number @1@ ) 0.07) ) (\"difficult\" 0) (\"bndbox\" (\"xmin\" (round(string-to-number @4@))) (\"ymin\" (round(string-to-number @5@))) (\"xmax\" (round(string-to-number @6@))) (\"ymax\" (round(string-to-number @7@)))) )")改defun etxml-KITTI-print-buffer-to-xml 为(defun etxml-KITTI-print-buffer-to-xml () (interactive) (let* ((dest-buffer (concat (buffer-name) ".xml") ) (original-buffer (buffer-name)) (original-file-name (file-name-sans-extension original-buffer ) ) (image-file-path (concat kitti-image-root original-file-name ".png")) (image-dims (image-size (create-image image-file-path) t) ) ) (unless (bufferp dest-buffer) (setq dest-buffer (get-buffer-create dest-buffer) ) ) (with-current-buffer dest-buffer (insert (concat "<annotation>\n<folder>VOC2007</folder>\n" ) ) (insert (concat "<filename>" original-file-name ".png</filename>\n"))(insert (concat "<source>\n<database>The VOC2007 Database</database>\n<annotation>VOC2007</annotation>\n<image>flickr</image>\n<flickrid>NULL</flickrid>\n</source>\n")) (insert (concat "<owner>\n<flickrid>YU Xiaochuan</flickrid>\n<name>YU Xiaochuan</name>\n</owner>")) (insert (concat "<size>\n<width>" (number-to-string (car image-dims)) "</width>\n<height>" (number-to-string (cdr image-dims)) "</height>\n<depth>3</depth>\n</size>\n" ))(insert (concat "<segmented>0</segmented>\n")) ) (etxml-print-buffer-to-xml etxml-KITTI-dataset-schema nil dest-buffer ) (with-current-buffer dest-buffer (insert "</annotation>") ) ) )
可以得到与VOC2007完全匹配的xml标注文件。
Emacs细节:
一年成为Emacs高手
2.Github RRC方法中的MATLAB脚本
https://github.com/xiaohaoChen/rrc_detection。
阅读全文
0 0
- emacs...
- emacs
- ~/.emacs
- .emacs
- emacs
- emacs
- emacs
- Emacs
- emacs
- emacs
- Emacs
- Emacs
- .emacs
- Emacs
- Emacs
- emacs
- emacs
- Emacs
- 谷歌又新增了两个意想不到的功能
- php基础
- Perplexity
- BZOJ 2006: [NOI2010]超级钢琴
- CentOS 6.5 下Nginx的配置
- Emacs
- 用户空间和内核空间,进程上下文
- html标签
- LinkedBlockingDeque
- 使用c3p0链接数据库
- 【JavaScript】随笔2
- leetcode 107. Binary Tree Level Order Traversal II
- hadoop 伪分布式 web浏览器访问不到yarn
- 有序链表的插入