metadata
dataset_info:
features:
- name: image
dtype: image
- name: bbox
struct:
- name: ymin
dtype: int64
- name: xmin
dtype: int64
- name: ymax
dtype: int64
- name: xmax
dtype: int64
- name: family
dtype:
class_label:
names:
'0': A300
'1': A310
'2': A320
'3': A330
'4': A340
'5': A380
'6': ATR-42
'7': ATR-72
'8': An-12
'9': BAE 146
'10': BAE-125
'11': Beechcraft 1900
'12': Boeing 707
'13': Boeing 717
'14': Boeing 727
'15': Boeing 737
'16': Boeing 747
'17': Boeing 757
'18': Boeing 767
'19': Boeing 777
'20': C-130
'21': C-47
'22': CRJ-200
'23': CRJ-700
'24': Cessna 172
'25': Cessna 208
'26': Cessna Citation
'27': Challenger 600
'28': DC-10
'29': DC-3
'30': DC-6
'31': DC-8
'32': DC-9
'33': DH-82
'34': DHC-1
'35': DHC-6
'36': DR-400
'37': Dash 8
'38': Dornier 328
'39': EMB-120
'40': Embraer E-Jet
'41': Embraer ERJ 145
'42': Embraer Legacy 600
'43': Eurofighter Typhoon
'44': F-16
'45': F/A-18
'46': Falcon 2000
'47': Falcon 900
'48': Fokker 100
'49': Fokker 50
'50': Fokker 70
'51': Global Express
'52': Gulfstream
'53': Hawk T1
'54': Il-76
'55': King Air
'56': L-1011
'57': MD-11
'58': MD-80
'59': MD-90
'60': Metroliner
'61': PA-28
'62': SR-20
'63': Saab 2000
'64': Saab 340
'65': Spitfire
'66': Tornado
'67': Tu-134
'68': Tu-154
'69': Yak-42
- name: manufacturer
dtype:
class_label:
names:
'0': ATR
'1': Airbus
'2': Antonov
'3': Beechcraft
'4': Boeing
'5': Bombardier Aerospace
'6': British Aerospace
'7': Canadair
'8': Cessna
'9': Cirrus Aircraft
'10': Dassault Aviation
'11': Dornier
'12': Douglas Aircraft Company
'13': Embraer
'14': Eurofighter
'15': Fairchild
'16': Fokker
'17': Gulfstream Aerospace
'18': Ilyushin
'19': Lockheed Corporation
'20': Lockheed Martin
'21': McDonnell Douglas
'22': Panavia
'23': Piper
'24': Robin
'25': Saab
'26': Supermarine
'27': Tupolev
'28': Yakovlev
'29': de Havilland
- name: variant
dtype:
class_label:
names:
'0': 707-320
'1': 727-200
'2': 737-200
'3': 737-300
'4': 737-400
'5': 737-500
'6': 737-600
'7': 737-700
'8': 737-800
'9': 737-900
'10': 747-100
'11': 747-200
'12': 747-300
'13': 747-400
'14': 757-200
'15': 757-300
'16': 767-200
'17': 767-300
'18': 767-400
'19': 777-200
'20': 777-300
'21': A300B4
'22': A310
'23': A318
'24': A319
'25': A320
'26': A321
'27': A330-200
'28': A330-300
'29': A340-200
'30': A340-300
'31': A340-500
'32': A340-600
'33': A380
'34': ATR-42
'35': ATR-72
'36': An-12
'37': BAE 146-200
'38': BAE 146-300
'39': BAE-125
'40': Beechcraft 1900
'41': Boeing 717
'42': C-130
'43': C-47
'44': CRJ-200
'45': CRJ-700
'46': CRJ-900
'47': Cessna 172
'48': Cessna 208
'49': Cessna 525
'50': Cessna 560
'51': Challenger 600
'52': DC-10
'53': DC-3
'54': DC-6
'55': DC-8
'56': DC-9-30
'57': DH-82
'58': DHC-1
'59': DHC-6
'60': DHC-8-100
'61': DHC-8-300
'62': DR-400
'63': Dornier 328
'64': E-170
'65': E-190
'66': E-195
'67': EMB-120
'68': ERJ 135
'69': ERJ 145
'70': Embraer Legacy 600
'71': Eurofighter Typhoon
'72': F-16A/B
'73': F/A-18
'74': Falcon 2000
'75': Falcon 900
'76': Fokker 100
'77': Fokker 50
'78': Fokker 70
'79': Global Express
'80': Gulfstream IV
'81': Gulfstream V
'82': Hawk T1
'83': Il-76
'84': L-1011
'85': MD-11
'86': MD-80
'87': MD-87
'88': MD-90
'89': Metroliner
'90': Model B200
'91': PA-28
'92': SR-20
'93': Saab 2000
'94': Saab 340
'95': Spitfire
'96': Tornado
'97': Tu-134
'98': Tu-154
'99': Yak-42
splits:
- name: train
num_bytes: 879465161.444
num_examples: 3334
- name: validation
num_bytes: 866544443.931
num_examples: 3333
- name: test
num_bytes: 874244310.534
num_examples: 3333
download_size: 2761722129
dataset_size: 2620253915.909
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
Code snippet to visualise the position of the box
import matplotlib.image as img
import matplotlib.pyplot as plt
from datasets import load_dataset
from matplotlib.patches import Rectangle
# Load dataset
ds_name = "HuggingFaceM4/FGVC-Aircraft"
ds = load_dataset(ds_name, use_auth_token=True)
# Extract information for the sample we want to show
index = 300
sample = ds["train"][index]
box_coord = sample["bbox"]
xmin = box_coord["xmin"]
ymin = box_coord["ymin"]
xmax = box_coord["xmax"]
ymax = box_coord["ymax"]
img_path = sample["image"].filename
# Create plot
# define Matplotlib figure and axis
fig, ax = plt.subplots()
# plot figure
image = img.imread(img_path)
ax.imshow(image)
# add rectangle to plot
ax.add_patch(
Rectangle((xmin, ymin), xmax-xmin, ymax - ymin, fill=None)
)
# display plot
plt.show()