db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
1
673
SQL
stringlengths
23
804
schema
stringclasses
69 values
image_and_language
Give the number of images containing the object sample of "suit".
number of images refers to IMG_ID; object sample of "suit" refers to OBJ_CLASS = 'suit'
SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'suit' GROUP BY T2.IMG_ID ) T
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the relationship between "feathers" and "onion" in image no.2345528?
relationship refers to PRED_CLASS; "feathers" and "onion" in image no.2345528 refers to IMG_ID = 2345528 and OBJ_CLASS = 'feathers' and OBJ_CLASS = 'onion'
SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE (T4.OBJ_CLASS = 'feathers' OR T4.OBJ_CLASS = 'onion') AND T2.IMG_ID = 2345528 GROUP BY T1.PRED_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Tell the attribute of the weeds in image no.2377988.
attribute of the weeds refers to OBJ_CLASS = 'weeds'; image no.2377988 refers to IMG_ID = 2377988
SELECT T2.ATT_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T4.OBJ_CLASS = 'weeds' AND T1.IMG_ID = 2377988
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the object whose attribute is blurry in image no.2377993? Give the explanation about the object.
attribute is blurry refers to ATT_CLASS = 'blurry'; image no.2377993 refers to IMG_ID = 22377993; explanation about the object refers to OBJ_CLASS
SELECT T4.OBJ_CLASS_ID, T4.OBJ_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T2.ATT_CLASS = 'blurry' AND T1.IMG_ID = 22377993
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many samples of "wall" are there in image no.2353079?
samples of "wall" refers to OBJ_SAMPLE_ID and OBJ_CLASS = 'wall' ; image no.2353079 refers to IMG_ID = 2353079
SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'wall' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2353079
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the object class of sample no.10 of image no.2320341.
object class refers to OBJ_CLASS; sample no.10 refers to OBJ_SAMPLE_ID = 10; image no.2320341 refers to IMG_ID = 2320341
SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2320341 AND T2.OBJ_SAMPLE_ID = 10
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many times is the number of images containing "broccoli" than "tomato"?
images refers to IMG_ID; "broccoli" refers to OBJ_CLASS = 'broccoli'; "tomato" refers to OBJ_CLASS = 'tomato' ; How many times = divide(count(OBJ_SAMPLE_ID) when OBJ_CLASS = 'broccoli', count(OBJ_SAMPLE_ID) when OBJ_CLASS = 'tomato')
SELECT CAST(COUNT(CASE WHEN T1.OBJ_CLASS = 'broccoli' THEN T2.OBJ_SAMPLE_ID ELSE NULL END) AS REAL) / COUNT(CASE WHEN T1.OBJ_CLASS = 'tomato' THEN T2.OBJ_SAMPLE_ID ELSE NULL END) times FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have at least 25 attributes?
images refers to IMG_ID; have at least 25 attributes refers to count(ATT_CLASS_ID) > = 25
SELECT COUNT(*) FROM ( SELECT IMG_ID FROM IMG_OBJ_att GROUP BY IMG_ID HAVING COUNT(ATT_CLASS_ID) > 25 ) T1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the ids of the images that have a self-relation relationship.
ids of the images refers to IMG_ID; self-relations refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID
SELECT DISTINCT IMG_ID FROM IMG_REL WHERE OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many objects are there in the attribute class id with the highest number of objects?
objects refers to OBJ_SAMPLE_ID; attribute class id with the highest number of objects refers to max(COUNT(ATT_CLASS_ID))
SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_att GROUP BY IMG_ID ORDER BY COUNT(ATT_CLASS_ID) DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the id of all the objects belonging to the transportation class?
id of all the objects belonging to the transportation class refers to OBJ_CLASS_ID and OBJ_CLASS IN ('bus', 'train', 'aeroplane', 'car', 'etc.')
SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS IN ('bus', 'train', 'aeroplane', 'car', 'etc')
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the corresponding classes for the "very large bike" attribute?
attribute refers to ATT_CLASS
SELECT ATT_CLASS_ID FROM ATT_CLASSES WHERE ATT_CLASS = 'very large'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the unique id number identifying the onion object class?
unique id number identifying refers to OBJ_CLASS_ID; onion object class refers to OBJ_CLASS = 'onion'
SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the corresponding classes for attributes of image id 8.
classes for attributes refers to ATT_CLASS; image id 8 refers to IMG_ID = 8
SELECT T2.ATT_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 8
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the bounding box of the object with image id 4 and a prediction relationship class id of 144?
bounding box of the object refers to (x, y, W, H); image id refers to IMG_ID; prediction relationship class id of 144 refers to PRED_CLASS_ID = 144
SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 144 AND T1.IMG_ID = 3
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have at least 5 "black" classes?
images refers to IMG_ID; have at least 5 "black" classes refers to count(ATT_CLASS_ID) where ATT_CLASS = 'black' > = 5
SELECT COUNT(IMGID) FROM ( SELECT T1.IMG_ID AS IMGID FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.ATT_CLASS = 'black' GROUP BY T1.IMG_ID HAVING COUNT(T1.ATT_CLASS_ID) >= 5 ) T3
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the prediction relationship class id of the tallest image?
prediction relationship class id refers to PRED_CLASS_ID; tallest image refers to max(H)
SELECT T1.PRED_CLASS_ID FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID ORDER BY T2.H DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Which image has the highest number of "white" class attributes?
"white" class attributes refers to ATT_CLASS = 'white'; highest number refers to max(count(ATT_CLASS_ID))
SELECT T1.IMG_ID AS IMGID FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.ATT_CLASS = 'white' GROUP BY T1.IMG_ID ORDER BY COUNT(T1.ATT_CLASS_ID) DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the x and y coordinates of all the images with a prediction relationship class id of 98?
prediction relationship class id of 98 refers to PRED_CLASS_ID = 98
SELECT T2.X, T2.Y FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 98
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many prediction classes with "has" captions are there for image id 3050?
prediction classes with "has" captions refers to PRED_CLASS = 'has'; image id 3050 refers to IMG_ID = 3050
SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 3050 AND T2.PRED_CLASS = 'has'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the explanations about object classes of all the images with an x and y coordinate of 0.
explanations about distinct object classes refers to OBJ_CLASS; images refers to IMG_ID; x and y coordinate of 0 refers to X = 0 AND Y = 0
SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.X = 0 AND T2.Y = 0 GROUP BY T1.OBJ_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the captions of all the self-relation relationship prediction classes?
self-relation relationship refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID and PRED_CLASS; captions of prediction classes refers to PRED_CLASS
SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN pred_classes AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID GROUP BY T2.PRED_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Give all the bounding boxes for image 2222 whose object classes are feathers.
bounding boxes refers to (x, y, W, H); image 2222 refers to IMG_ID = 2222; object classes are feathers refers to OBJ_CLASS = 'feathers'
SELECT T2.X, T2.Y, T2.H, T2.W FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2222 AND T1.OBJ_CLASS = 'feathers'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Among the objects that have multiple relations, how many images whose captions for the prediction class ids are "on"?
objects that have multiple relations refers to OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID; captions for the prediction class ids are "on" refers to PRED_CLASS = 'on'
SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID != T1.OBJ2_SAMPLE_ID AND T2.PRED_CLASS = 'on'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the object class of the image with a bounding box of 0, 0, 135, 212?
object class of the image refers to OBJ_CLASS; bounding box of 0, 0, 135, 212 refers to X = 0 AND Y = 0 AND W = 135 AND H = 212
SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.X = 0 AND T2.Y = 0 AND T2.W = 135 AND T2.H = 212
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Provide the dimensions of the bounding box that contains the keyboard that was spotted in image no. 3.
dimensions of the bounding box refers to (W, H); keyboard refers to OBJ_CLASS = 'keyboard'; image no. 3 refers to IMG_ID = 3
SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 3 AND T2.OBJ_CLASS = 'keyboard'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Identify the border's coordinates on the X and Y axes that enclose a folk in image no. 6.
coordinates on the X and Y axes refers to X and Y; folk refers to OBJ_CLASS = 'folk'; image no. 6 refers to IMG_ID = 6
SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 6 AND T2.OBJ_CLASS = 'folk'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Define the onion's bounding box on image no. 285930.
bounding box refers to (X, Y, W, H); onion refers to OBJ_CLASS = 'onion'; image no.285930 refers to IMG_ID = 285930
SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 285930 AND T2.OBJ_CLASS = 'onion'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many objects can you spot in image no. 72? What objects may be identified on the same image and within the bounding box represented as (341, 27, 42, 51)?
How many objects refers to OBJ_CLASS_ID; image no. 72 refers to IMG_ID = 72; What objects refers to OBJ_CLASS; bounding box represented as (341, 27, 42, 51) refers to X = 341 and Y = 27 and W = 42 and H = 51
SELECT SUM(IIF(T1.IMG_ID = 1, 1, 0)), SUM(IIF(T1.X = 341 AND T1.Y = 27 AND T1.W = 42 AND T1.H = 51, 1, 0)) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
On image no. 5, name the attributes that are composed of multiple objects.
image no. 5 refers to IMG_ID = 5; name the attributes refers to ATT_CLASS; multiple objects refers to count(ATT_CLASS) > = 2
SELECT T2.ATT_CLASS FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 5 GROUP BY T2.ATT_CLASS HAVING COUNT(T2.ATT_CLASS) > 2
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What attributes are used to describe the wall on image no. 27.
What attributes refers to ATT_CLASS; wall on image no. 27 refers to OBJ_CLASS = 'wall' and IMG_ID = 27
SELECT T4.ATT_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T2.OBJ_CLASS = 'wall' AND T1.IMG_ID = 27 GROUP BY T4.ATT_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Name the object element that is described as being scattered on image no. 10.
Name the object element refers to OBJ_CLASS; scattered refers to ATT_CLASS = 'scattered'; image no. 10 refers to IMG_ID = 10
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T4.ATT_CLASS = 'scattered' AND T1.IMG_ID = 10 GROUP BY T2.OBJ_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images contain 'bridge' as an object element?
images refers to IMG_ID; 'bridge' as an object element refers to OBJ_CLASS = 'bridge'
SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'bridge'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many object elements are there on average in each image?
object elements refers to OBJ_CLASS_ID; average = divide(count(OBJ_CLASS_ID), count(IMG_ID))
SELECT CAST(COUNT(OBJ_CLASS_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What colour is the van that can be spotted in image no. 1?
colour refers to ATT_CLASS; van refers to OBJ_CLASS = 'van'; image no. 1 refers to IMG_ID = 1
SELECT T4.ATT_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T2.OBJ_CLASS = 'van' AND T1.IMG_ID = 1 GROUP BY T4.ATT_CLASS
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Describe the objects, their attributes, and the relationships that comprise the scene on image no. 1 within the bounding box, represented as (388, 369, 48, 128).
objects refers to OBJ_CLASS; attributes refers to ATT_CLASS; relationships refers to PRED_CLASS; image no. 1 refers to IMG_ID = 1; bounding box, represented as (388, 369, 48, 128) refers to X = 388 and Y = 369 and W = 48 and H = 128
SELECT DISTINCT T2.OBJ_CLASS, T4.ATT_CLASS, T6.PRED_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID INNER JOIN IMG_REL AS T5 ON T1.IMG_ID = T5.IMG_ID INNER JOIN PRED_CLASSES AS T6 ON T5.PRED_CLASS_ID = T6.PRED_CLASS_ID WHERE T1.IMG_ID = 1 AND T1.X = 388 AND T1.Y = 369 AND T1.W = 48 AND T1.H = 128
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the relationship between object sample no. 25 and object sample no. 2 on image no. 1?
relationship refers to PRED_CLASS; object sample no. 25 and object sample no. 2 refers to OBJ1_SAMPLE_ID = 25 and OBJ2_SAMPLE_ID = 2; image no. 1 refers to IMG_ID = 1
SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 1 AND T1.OBJ1_SAMPLE_ID = 25 AND T1.OBJ2_SAMPLE_ID = 2
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many attributes are related to the object sample no. 7 on image no. 4?
How many attributes refers to ATT_CLASS_ID; object sample no. 7 on image no. 4 refers to IMG_ID = 4 and OBJ_SAMPLE_ID = 7
SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_ATT WHERE IMG_ID = 4 AND OBJ_SAMPLE_ID = 7
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many object elements can be detected on image no. 31?
How many object elements refers to OBJ_CLASS_ID; image no. 31 refers to IMG_ID = 31
SELECT COUNT(OBJ_CLASS_ID) FROM IMG_OBJ WHERE IMG_ID = 31
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
On image no. 20, identify the attribute ID that is composed of the highest number of objects.
image no. 20 refers to IMG_ID = 20; attribute ID refers to ATT_CLASS_ID; highest number of objects refers to max(count(ATT_CLASS_ID))
SELECT ATT_CLASS_ID FROM IMG_OBJ_ATT WHERE IMG_ID = 20 GROUP BY ATT_CLASS_ID ORDER BY COUNT(ATT_CLASS_ID) DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Define the bounding box of the object sample no. 7 on image no. 42.
bounding box of the object refers to (X, Y, W, H); sample no.7 on image no.42 refers to IMG_ID = 42 and OBJ_SAMPLE_ID = 7
SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 42 AND OBJ_SAMPLE_ID = 7
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
On image no. 99 identify the percentage of objects that are described as white.
image no. 99 refers to IMG_ID = 99; described as white refers to ATT_CLASS = 'white'; percentage = divide(count(OBJ_SAMPLE_ID) where ATT_CLASS = 'white', count(OBJ_SAMPLE_ID)) as percentage
SELECT CAST(SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 99
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many attribute classes are there for image id 5?
attribute classes refer to ATT_CLASS_ID; image id 5 refers to IMG_ID = 5;
SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_ATT WHERE IMG_ID = 5
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the explanation about object class 10.
explanation about object class 10 refers to OBJ_CLASS where OBJ_CLASS_ID = 10;
SELECT OBJ_CLASS FROM OBJ_CLASSES WHERE OBJ_CLASS_ID = 10
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Name the object class of the image with a bounding (422, 63, 77, 363).
image with a bounding (422, 63, 77, 363) refers to OBJ_CLASS_ID where X = 422 and Y = 63 and W = 77 and H = 363;
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 422 AND T1.Y = 63 AND T1.W = 77 AND T1.H = 363
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the caption for the prediction class id 12?
caption for the prediction class id 12 refers to PRED_CLASS where PRED_CLASS_ID = 12;
SELECT PRED_CLASS FROM PRED_CLASSES WHERE PRED_CLASS_ID = 12
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Indicate the bounding box of the image 8.
bounding box refers to X, Y, W, H from IMG_OBJ; image 8 refers to IMG_ID = 8;
SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 8
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many object samples in image no.908 are in the class of tip?
object samples in the class of "tip" refer to OBJ_CLASS_ID where OBJ_CLASS = 'tip'; image no.5 refers to IMG_ID = 5;
SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'tip' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 908
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List out the number of object samples in image no.41 which are in the class of "kitchen"?
object samples in the class of "kitchen" refer to OBJ_CLASS_ID where OBJ_CLASS = 'kitchen'; image no.41 refers to IMG_ID = 41 ;
SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'kitchen' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 41
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Count the image numbers that contain the "paint" object.
image numbers that contain the "paint" object refer to IMG_ID where OBJ_CLASS = 'paint';
SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'paint'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many samples of clouds are there in the image no.2315533?
samples of clouds refer to IMG_ID where OBJ_CLASS = 'cloud'; image no.2315533 refers to IMG_ID = 2315533;
SELECT SUM(CASE WHEN T1.IMG_ID = 2315533 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'clouds'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Which object classes belong to the onion category?
onion category refers to OBJ_CLASS = 'onion';
SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the bounding box of "spoon" in image id 1344?
the bounding box refers to X, Y, W, H from IMG_OBJ; image id 1344 refers to IMG_ID = 1344; "spoon" refers to OBJ_CLASS = 'spoon';
SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1344 AND T2.OBJ_CLASS = 'spoon'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the percentage of "surface" object samples in image No.2654?
DIVIDE(SUM(OBJ_CLASS_ID where OBJ_CLASS = 'surface'), COUNT(OBJ_CLASS_ID)) as percentage where IMG_ID = 2654;
SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'surface' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 2654
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images include the "wood" objects?
images refer to IMG_ID; "wood" objects refer to OBJ_CLASS = 'wood';
SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'wood'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the object class of the image with tallest bounding box.
bounding box refers to X, Y, W, H from IMG_OBJ; tallest relates to the height of the bounding box which refers to MAX(H); object class refers to OBJ_CLASS;
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID ORDER BY T1.H DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Calculate the percentage of "airplane" object class in the table.
DIVIDE(SUM(OBJ_SAMPLE_ID where OBJ_CLASS = 'airplane'), COUNT(OBJ_CLASS)) as percentage;
SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'airplane' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OBJ_CLASS) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many samples of animal objects are there in image no.660?
samples of animal objects refer to OBJ_SAMPLE_ID where OBJ_CLASS = 'animal'; image no.660 refers to IMG_ID = 660;
SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'animal' AND T1.IMG_ID = 660
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Name number of samples of "bed" object are there in the image No.1098?
samples of "bed" object refer to OBJ_SAMPLE_ID where OBJ_CLASS = 'bed'; image No.1098 refers to IMG_ID = 1098;
SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'bed' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1098
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Name the object class of the image with lowest bounding box.
bounding box refers to X, Y, W, H from IMG_OBJ; lowest relates to the height of the bounding box which refers to MIN(H);
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID ORDER BY T1.H LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Indicating the bounding box of "kitchen" in image id 250.
bounding box refers to X, Y, W, H from IMG_OBJ; "kitchen" in image id 250 refers to OBJ_CLASS = 'kitchen' where IMG_ID = 250;
SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 250 AND T2.OBJ_CLASS = 'kitchen'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Which images have more than 20 object samples?
images have more than 20 object samples refer to IMG_ID where COUNT(OBJ_SAMPLE_ID) > 20;
SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(IMG_ID) > 20
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Which object in image 8 is the widest? State its object sample ID.
widest relates to the width of the bounding box of the object which refers to MAX(W); object in image 8 refers to OBJ_SAMPLE_ID where IMG_ID = 8;
SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 8 ORDER BY W DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Find the object in image 5 where the object with the coordinate of (634, 468).
object in image 5 refers to OBJ_SAMPLE_ID where IMG_ID = 5; coordinates of (634, 468) refer to X and Y coordinates of the bounding box in which X = 634 and Y = 468;
SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 5 AND X = 634 AND Y = 468
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Which object has the highest attribute classes?
object has the highest attribute classes refers to OBJ_SAMPLE_ID where MAX(COUNT(OBJ_SAMPLE_ID));
SELECT OBJ_SAMPLE_ID FROM IMG_OBJ_ATT GROUP BY OBJ_SAMPLE_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the ratio between the number of object samples in image 1 and the number of object samples in image 6?
DIVIDE(SUM(OBJ_SAMPLE_ID where IMG_ID = 1), SUM(OBJ_SAMPLE_ID where IMG_ID = 6));
SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Calculate the average of object samples for the image.
DIVIDE(COUNT(OBJ_SAMPLE_ID), COUNT(IMG_ID));
SELECT CAST(COUNT(OBJ_SAMPLE_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the IDs of images that have objects with the attributes of 'wired'.
IDs of images refer to IMG_ID; objects with the attributes of 'wired' refer to ATT_CLASS = 'wired';
SELECT DISTINCT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'wired'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the object classes in image 10.
object classes refer to OBJ_CLASS; image 10 refers to IMG_ID = 10;
SELECT DISTINCT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 10
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List attributes for object class 'tip' In image 1314.
attributes for object refer to ATT_CLASS; class 'tip' in image 1314 refers to OBJ_CLASS = 'tip' where IMG_ID = 1314;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T3.IMG_ID = 1314 AND T4.OBJ_CLASS = 'tip'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the prediction class between object class 'chain' and 'label' in image 2360078?
prediction class refers to PRED_CLASS; object class 'chain' refers to OBJ_CLASS = 'chain'; object class 'label' refers to OBJ_CLASS = 'label'; image 2360078 refers to IMG_ID = 2360078;
SELECT DISTINCT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T2.PRED_CLASS_ID = T1.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID AND T1.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.IMG_ID = 2360078 AND T1.OBJ1_SAMPLE_ID = 15 OR T1.OBJ2_SAMPLE_ID = 18
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have objects with the attributes of polka dot?
attributes of polka dot refer to ATT_CLASS = 'polka dot'; images refer to IMG_ID;
SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'polka dot'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the attributes of the widest object in image 400?
attributes refer to ATT_CLASS; the widest relates to the width of the bounding box of the object which refers to MAX(W); image 400 refers to IMG_ID = 400;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T2.IMG_ID = 400 ORDER BY T3.W DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the name of the object class that has in most images.
object class that has in most images refers to OBJ_CLASS where MAX(COUNT(OBJ_CLASS_ID));
SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_ID) DESC LIMIT 1
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the width and height of the object with the class of 'van' in image 1.
The bounding box's W and H abbreviations stand for the object's width and height respectively; class of 'van' in image 1 refers to OBJ_CLASS = 'van' where IMG_ID = 1;
SELECT T1.H, T1.W FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1 AND T2.OBJ_CLASS = 'van'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
State the coordinate of X and Y for the object with the attribute of 'sparse' in image 1.
coordinates of X and Y for the object refer to X and Y coordinates of the bounding box; attribute of 'sparse' in image 1 refers to IMG_ID = 1 where ATT_CLASS = 'sparse';
SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 1 AND T1.ATT_CLASS = 'sparse'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Calculate the percentage of object samples that are related to street lights.
DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'street lights'), COUNT(OBJ_SAMPLE_ID)) as percentage;
SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'street lights' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_SAMPLE_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Based on image 5, what is the percentage of images that belong windows object class?
DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'windows' and IMG_ID = 5), COUNT(OBJ_SAMPLE_ID where IMG_ID = 5)) as percentage;
SELECT CAST(COUNT(T1.OBJ_SAMPLE_ID) AS REAL) * 100 / COUNT(CASE WHEN T1.IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'windows'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have an x-coordinate of 5 and y-coordinate of 5?
X and Y refer to coordinates of the bounding box where X = 5 and Y = 5; images refer to IMG_ID;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE X = 5 AND Y = 5
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have less than 15 object samples?
images refer to IMG_ID; less than 15 object samples refer to COUNT(OBJ_SAMPLE_ID) < 15;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_SAMPLE_ID < 15
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have a total of 10 attribute classes?
images refer to IMG_ID; total of 10 attribute classes refers to COUNT(OBJ_CLASS_ID) = 10;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_CLASS_ID = 10
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List the ID of all images with objects that have multiple relations.
ID of all images refer to IMG_ID; if two objects (OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID) has multiple PRED_CLASS_ID, it means these two objects have multiple relations;
SELECT IMG_ID FROM IMG_REL GROUP BY PRED_CLASS_ID HAVING COUNT(DISTINCT OBJ1_SAMPLE_ID) != 0 AND COUNT(DISTINCT OBJ2_SAMPLE_ID) != 0
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have "vegetable" and "fruits" as their object classes?
images refer to IMG_ID; "vegetables" and "fruits" as object classes refer to OBJ_CLASS = 'vegetables' and OBJ_CLASS = 'fruits';
SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'vegetables' OR T2.OBJ_CLASS = 'fruits'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What is the image ID with a predicted class of "parked on"?
predicted class of "parked on" refers to PRED_CLASS = 'parked on';
SELECT DISTINCT T1.IMG_ID FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'parked on'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the object classes of the images that have a (5,5) coordinate.
object classes refer to OBJ_CLASS; (5,5) coordinates refer to X and Y coordinates of the bounding box where X = 5 and Y = 5;
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 5 AND T1.Y = 5
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have "keyboard" as their object class?
images refer to IMG_ID; "keyboard" as object class refers to OBJ_CLASS = 'keyboard';
SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
What are the width and height of the bounding box of the object with "keyboard" as their object class and (5, 647) as their coordinate?
The bounding box's W and H abbreviations stand for the object's width and height respectively; "keyboard" as object class refers to OBJ_CLASS = 'keyboard'; (5, 647) as coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 647;
SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard' AND T1.X = 5 AND T1.Y = 647
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the ID of the images that have an attribute class of "horse".
ID of all images refer to IMG_ID; attribute class of "horse" refers to ATT_CLASS = 'horse';
SELECT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'horse'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Provide the x-coordinate and y-coordinate of the image with an attribute class of ''horse" and an object class of "fur".
attribute class of "horse" refers to ATT_CLASS = 'horse'; object class of "fur" refers to OBJ_CLASS = 'fur';
SELECT T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'horse' AND T4.OBJ_CLASS = 'fur'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the attribute classes of the image ID "15".
attribute classes of the image ID "15" refer to ATT_CLASS where IMG_ID = 15;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 15
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
For those objects that have multiple relations, how many images have a prediction class of "reading"?
prediction class of "reading" refers to PRED_CLASS = 'reading'; if two objects (OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID) has multiple PRED_CLASS_ID, it means these two objects have multiple relations;
SELECT COUNT(T1.IMG_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'reading'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have "picture" as their attribute class?
images have "picture" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';
SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
How many images have "picture" as their attribute class and "bear" as their object class?
"picture" as attribute class refers to ATT_CLASS = 'picture'; "bear" as object class refers to OBJ_CLASS = 'bear'; images refer to IMG_ID;
SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'picture' AND T4.OBJ_CLASS = 'bear'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the attribute classes of the images that have a (5,5) coordinate.
attribute classes refer to ATT_CLASS; (5,5) coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 5;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.X = 5 AND T3.Y = 5
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Calculate the average number of images with an attribute class of "keyboard".
AVG(IMG_ID) where OBJ_CLASS = 'keyboard';
SELECT AVG(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard'
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
Calculate the ratio of the total number of images with an object class of "man" and "person".
DIVIDE(COUNT(IMG_ID where OBJ_CLASS = 'man'), COUNT(IMG_ID where OBJ_CLASS = 'person'));
SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List the object sample IDs of image ID 17 with coordinates (0,0).
object sample ID refers to OBJ_SAMPLE_ID; image ID 17 refers to IMG_ID = 17; coordinates (0,0) refer to X and Y coordinates of the bounding box where X = 0 and Y = 0;
SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 17 AND X = 0 AND Y = 0
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all bounding box widths and heights of object sample ID 2.
The bounding box's W and H abbreviations stand for the object's width and height respectively; object sample ID 2 refers to OBJ_SAMPLE_ID = 2;
SELECT W, H FROM IMG_OBJ WHERE OBJ_SAMPLE_ID = 2
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
In the Y coordinate of image ID 12, how many are 0?
Y coordinate many are 0 refers to Y coordinates of the bounding box where Y = 0; image ID 12 refers to IMG_ID = 12;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE IMG_ID = 12 AND Y = 0
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,
image_and_language
List all the attribute classes of image ID 22.
attribute classes of image ID 22 refer to ATT_CLASS where MG_ID = 22;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 22
database name:db_id image_and_language ATT_CLASSES table ATT_CLASSES Cols: ATTRIBUTE CLASS ID dtype integer, ATTRIBUTE CLASS dtype text, OBJ_CLASSES table OBJ_CLASSES Cols: OBJECT CLASS ID dtype integer, OBJECT CLASS dtype text, IMG_OBJ table IMG_OBJ Cols: IMAGE ID dtype integer, OBJECT SAMPLE ID dtype integer, OBJECT CLASS ID dtype integer, X dtype integer, Y dtype integer, W dtype integer, H dtype integer, IMG_OBJ_ATT table IMG_OBJ_ATT Cols: IMAGE ID dtype integer, ATTRIBUTE CLASS ID dtype integer, OBJECT SAMPLE ID dtype integer, PRED_CLASSES table PRED_CLASSES Cols: PREDICTION CLASS ID dtype integer, PREDICTION CLASS dtype text, IMG_REL table IMG_REL Cols: IMAGE ID dtype integer, PREDICTION CLASS ID dtype integer, OBJECT1 SAMPLE ID dtype integer, OBJECT2 SAMPLE ID dtype integer,