Comments (3)
My reply times are usually bimodal: either I respond right away or it will fall out of my inbox and be forgotten forever!
from sg2im.
In some of my earlier experiments I tried some additional relationships on COCO, defined as follows (replaces https://github.com/google/sg2im/blob/master/sg2im/data/coco.py#L337)
touching = False
if self.touching_relations:
area_s = (sx1 - sx0) * (sy1 - sy0)
area_o = (ox1 - ox0) * (oy1 - oy0)
ix0, ix1 = max(sx0, ox0), min(sx1, ox1)
iy0, iy1 = max(sy0, oy0), min(sy1, oy1)
area_i = max(0, ix1 - ix0) * max(0, iy1 - iy0)
iou = area_i / (area_s + area_o - area_i)
touching = 0.1 < iou < 0.5
if sx0 < ox0 and sx1 > ox1 and sy0 < oy0 and sy1 > oy1:
p = 'surrounding'
elif sx0 > ox0 and sx1 < ox1 and sy0 > oy0 and sy1 < oy1:
p = 'inside'
elif theta >= 3 * math.pi / 4 or theta <= -3 * math.pi / 4:
p = 'right touching' if touching else 'left of'
elif -3 * math.pi / 4 <= theta < -math.pi / 4:
p = 'bottom touching' if touching else 'above'
elif -math.pi / 4 <= theta < math.pi / 4:
p = 'left touching' if touching else 'right of'
elif math.pi / 4 <= theta < 3 * math.pi / 4:
p = 'top touching' if touching else 'below'
p = self.vocab['pred_name_to_idx'][p]
triples.append([s, p, o])
However in the final models I didn't end up using these relationships. They are still present in the vocab of the pretrained models, but these relationships were not used at all during training and the embeddings associated with these relationships in the released model weights will be random. Thus if you try to pass a scene graph with one of these "touching" relationships, you will probably get a garbage output from the model.
from sg2im.
Many thanks for the impressively quick reply! Really appreciate the clarification!
from sg2im.
Related Issues (20)
- ไปๅใ
- Does it supports multi-gpu training?
- scene graphs HOT 4
- [Paper Confusion] Figure 3 HOT 3
- Switching to eval mode after 100k iterations
- Some confusions at coco 2017 stuff dataset HOT 1
- No module named 'tkinter' HOT 1
- Is this project still being worked upon? HOT 1
- Image quality HOT 4
- Question about Inception Scores HOT 1
- how to save the result of only layouts which models the relations among components ? HOT 1
- I found that in sg2im/sg2im/data/vg.py per image maybe have different numbers of objects? HOT 4
- FileNotFoundError: [Errno 2] No such file or directory: 'checkpoint_with_model.pt'
- Question about bounding box?
- Dataloader on COCO Validation dataset
- No module named 'sg2im' HOT 1
- Segmentation fault: 11
- about the raw relationships.json
- Doesn't work on M1 chip MacOS environment
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 sg2im.