[Current]Notes for Scene Graph Generation Project

I.GitHub project

sg project: https://github.com/danfeiX/scene-graph-TF-release

sg dataset prepare: https://github.com/danfeiX/scene-graph-TF-release/tree/master/data_tools

py-faster-rcnn: https://github.com/rbgirshick/py-faster-rcnn

II.配置記錄 configuration records:

python版本:2.7

tensorflow版本:0.11.0

cuda版本:8.0

cudnn版本:6.0.21

III.Visual Genmoe數據集與scene-graph項目

1.VGdataset數據格式:

https://blog.csdn.net/zziahgf/article/details/79097839

注:object_id, relationship_id等爲某一類的id,並非單個物體,例如所有"man"的id均爲1058532,而不是每個人不同。

objects.json的數據格式的例子,換行表示

[

{"image_id": 1,

"objects":

[{"synsets": ["tree.n.01"],

"h": 557,

"object_id": 1058549,

"merged_object_ids": [],

"names":  ["trees"]

"w": 799,

"x":0,

"y":0},...]

...}

{"image_id:" 2...

}...], "image_url": ""}

]

注,boudingbox的x、y應指其左上角座標

2.項目所需數據:

image,格式jpg

image metadata

vg scene graph其中包括objectrelationships,格式均爲json

3.relationships.json格式

下面爲VG數據集中的一個圖片,其image_id爲1

所有圖片的relationships的集合,即relationships.json的格式(例子)爲:

[

{"relationships":

[{relationship描述1}, {relationship描述2}...],

"image_id": 1}, ...

]

relationship描述 的格式(例子)爲:

{

"predicate": "wears",

"object": {

  "name": "sneakers",

  "h": 26,

  "object_id": 5048,

  "synsets": [gym_shoe.n.01"],

  "w": 52,

  "y": 489,

  "x": 243 },

"relationshp_id": 15937,

"synsets": ["wear.v.01"],

"subject": {

  "name": "man",

  "h": 262,

  "object_id": 1058529,

  "synsets": ["man.n.01"],

  "w": 60,

  "y": 249,

  "x": 238 },

}

3.sh文件所需文件:

create_imdb.sh:輸入:jpg圖片及其metadata; 輸出:圖片h5格式的文件,imdb_1024.h5

create_rodib.sh:輸入

VI scene-graph-master代碼說明

核心代碼:

位置:networks/model.py

包含message pooling等核心代碼

 

各種網絡模型的基類:networks/networks.py

源代碼:https://github.com/yuxng/SubCNN_TF

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章