Comments (2)
感谢使用centerX,没关系,大家都是从菜鸟起步的。
如果是标准的coco格式的话,建议直接调用detectron2的接口,在data/dataset/builting.py中添加的就可以
from detectron2.data import MetadataCatalog
from detectron2.data.datasets import register_coco_instances
register_coco_instances("my_dataset", {}, "json_annotation.json", "path/to/image/dir")
MetadataCatalog.get("my_dataset").thing_classes = ["person", "dog"]
如果是私人数据集,可以仿照data/dataset/crowd_human.py来添加私人数据集,私人数据集不限标准,只要最后的返回统一格式就可以了,然后在data/dataset/builting.py中register一下你的私人数据集,就可以训练了。
instances = []
for obj in anno['gtboxes']:
cls = obj['tag']
if cls != "person":
continue
bbox = obj['vbox']
bbox = [float(x) for x in bbox]
bbox[2] = bbox[0] + bbox[2]
bbox[3] = bbox[1] + bbox[3]
bbox[0] = max(bbox[0], 0.0)
bbox[1] = max(bbox[1], 0.0)
bbox[2] = min(bbox[2], float(w))
bbox[3] = min(bbox[3], float(h))
if bbox[2] - bbox[0] > 1.0 and bbox[3] - bbox[1] > 1.0:
instances.append(
{"category_id": class_names.index(cls),
"bbox": bbox,
"bbox_mode": BoxMode.XYXY_ABS}
)
r["annotations"] = instances
if len(instances) > 0:
dicts.append(r)
centerX并没有对detectron2的数据注册方式进行修改,如果想知道详情可以参见detectron2的官方文档
点我
from centerx.
我会再去试试看,你写得真是详细,谢谢你! !
from centerx.
Related Issues (20)
- 导出onnx之后如何转trt HOT 1
- 请问有没有训练好的权重模型?
- 自定义数据集如何使用该工程 HOT 1
- TypeError: __init__() takes 1 positional argument but 4 were given HOT 1
- TypeError: _write_metrics() missing 1 required positional argument: 'data_time' HOT 2
- AP 大于1?
- 转caffe遇到问题 HOT 2
- 自定义数据集
- 训练问题 HOT 3
- Inference/demo.py的一个小问题 HOT 1
- ttf supported?
- issues HOT 3
- SWA in vanilla Detectron2 HOT 2
- 小白提问请问这个有人体关键点检测嘛
- whyCUDA out of memory. Tried to allocate 130.00 MiB (GPU 1; 7.80 GiB total capacity; 5.91 GiB already allocated; 33.56 MiB free; 6.09 GiB reserved in total by PyTorch)
- 自己数据训练问题
- 关于对于keypoints修改的问题
- 编译detectron2出现ninja: build stopped: subcommand failed如何解决?
- N个数据集所对应的N个教师模型,在datasets中如何摆放N个数据集(每个数据集均转成COCO格式)?
- Requests for segmentation or key point detection. HOT 1
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.
from centerx.