Spaces:
Runtime error
Runtime error
Commit
•
6a6f954
1
Parent(s):
c498d3b
Upload 10 files
Browse files- .gitattributes +5 -0
- American_football_heads_to_India_clip.mp4 +3 -0
- Motorcycle_clip.mp4 +3 -0
- PersonalFinance_clip.mp4 +3 -0
- Science_clip.mp4 +3 -0
- Spirituality_1_clip.mp4 +3 -0
- categories.txt +344 -0
- categories_json.txt +373 -0
- image_caption.py +65 -0
- main_classes.txt +1 -0
- sub_categories.txt +8 -0
.gitattributes
CHANGED
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
American_football_heads_to_India_clip.mp4 filter=lfs diff=lfs merge=lfs -text
|
37 |
+
Motorcycle_clip.mp4 filter=lfs diff=lfs merge=lfs -text
|
38 |
+
PersonalFinance_clip.mp4 filter=lfs diff=lfs merge=lfs -text
|
39 |
+
Science_clip.mp4 filter=lfs diff=lfs merge=lfs -text
|
40 |
+
Spirituality_1_clip.mp4 filter=lfs diff=lfs merge=lfs -text
|
American_football_heads_to_India_clip.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e046cda039f2bc5f1d55ce58bf378462f53a345a87bb5dfce140bd2f5ce7239d
|
3 |
+
size 1374236
|
Motorcycle_clip.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8378269d54afbc1d6f66a76c48aa283f114efa49c92b0648704f24fda35c13fd
|
3 |
+
size 2301029
|
PersonalFinance_clip.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:51c86118e86a96c11e27ccef98f589f3c0e31fd502eaef87e3b67088f994cce3
|
3 |
+
size 1215265
|
Science_clip.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:12a23a0713b8f115c3e76472c063af43c31a2a56c1d0f9999923becf3336f58e
|
3 |
+
size 1892769
|
Spirituality_1_clip.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ecb1a3f4b8c4caa8c6331f50db582648de9b778726d3dcdbf5829b013ebf8a6
|
3 |
+
size 2687681
|
categories.txt
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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to Technology
|
11 |
+
J) Auto Type
|
12 |
+
K) Car Culture
|
13 |
+
L) Dash Cam Videos
|
14 |
+
M) Motorcycles
|
15 |
+
N) Road-Side Assistance
|
16 |
+
O) Scooters
|
17 |
+
2) Books and Literature
|
18 |
+
A) Art and Photography Books
|
19 |
+
B) Biographies
|
20 |
+
C) Children's Literature
|
21 |
+
D) Comics and Graphic Novels
|
22 |
+
E) Cookbooks
|
23 |
+
F)Fiction
|
24 |
+
G) Poetry
|
25 |
+
H) Travel Books
|
26 |
+
I)Young Adult Literature
|
27 |
+
3) Business and Finance
|
28 |
+
A) Business
|
29 |
+
B) Economy
|
30 |
+
C) Industries
|
31 |
+
4) Careers
|
32 |
+
A) Apprenticeships
|
33 |
+
B) Career Advice
|
34 |
+
C) Career Planning
|
35 |
+
D) Job Search
|
36 |
+
E) Telecommuting
|
37 |
+
F) Vocational Training
|
38 |
+
5) Education
|
39 |
+
A) Adult Education
|
40 |
+
B) College Education
|
41 |
+
C) Early Childhood Education
|
42 |
+
D) Educational Assessment
|
43 |
+
E) Homeschooling
|
44 |
+
F) Homework and Study
|
45 |
+
G) Language Learning
|
46 |
+
H) Online Education
|
47 |
+
I) Primary Education
|
48 |
+
J) Private School
|
49 |
+
K) Secondary Education
|
50 |
+
L) Special Education
|
51 |
+
6) Family and Relationships
|
52 |
+
A) Bereavement
|
53 |
+
B) Dating
|
54 |
+
C) Divorce
|
55 |
+
D) Eldercare
|
56 |
+
E) Marriage and Civil Unions
|
57 |
+
F) Parenting
|
58 |
+
G) Single Life
|
59 |
+
7) Fine Art
|
60 |
+
A) Costume
|
61 |
+
B) Dance
|
62 |
+
C) Design
|
63 |
+
D) Digital Arts
|
64 |
+
E) Fine Art Photography
|
65 |
+
F) Modern Art
|
66 |
+
G) Opera
|
67 |
+
H) Theater
|
68 |
+
8) Food & Drink
|
69 |
+
A) Alcoholic Beverages
|
70 |
+
B) Barbecues and Grilling
|
71 |
+
C) Cooking
|
72 |
+
D) Desserts and Baking
|
73 |
+
E) Dining Out
|
74 |
+
F) Food Allergies
|
75 |
+
G) Food Movements
|
76 |
+
H) Healthy Cooking and Eating
|
77 |
+
I) Non-Alcoholic Beverages
|
78 |
+
J) Vegan Diets
|
79 |
+
K) Vegetarian Diets
|
80 |
+
L) World Cuisines
|
81 |
+
9) Healthy Living
|
82 |
+
A) Children's Health
|
83 |
+
B) Fitness and Exercise
|
84 |
+
C) Men's Health
|
85 |
+
D) Nutrition
|
86 |
+
E) Senior Health
|
87 |
+
F) Weight Loss
|
88 |
+
G) Wellness
|
89 |
+
H) Women's Health
|
90 |
+
10) Hobbies & Interests
|
91 |
+
A) Antiquing and Antiques
|
92 |
+
B) Arts and Crafts
|
93 |
+
C) Beekeeping
|
94 |
+
D) Birdwatching
|
95 |
+
E) Cigars
|
96 |
+
F) Collecting
|
97 |
+
G) Content Production
|
98 |
+
H) Games and Puzzles
|
99 |
+
I) Genealogy and Ancestry
|
100 |
+
J) Magic and Illusion
|
101 |
+
K) Model Toys
|
102 |
+
L) Musical Instruments
|
103 |
+
M) Paranormal Phenomena
|
104 |
+
N) Radio Control
|
105 |
+
O) Sci-fi and Fantasy
|
106 |
+
P) Workshops and Classes
|
107 |
+
11) Home & Garden
|
108 |
+
A) Gardening
|
109 |
+
B) Home Appliances
|
110 |
+
C) Home Entertaining
|
111 |
+
D) Home Improvement
|
112 |
+
E) Home Security
|
113 |
+
F) Indoor Environmental Quality
|
114 |
+
G) Interior Decorating
|
115 |
+
H) Landscaping
|
116 |
+
I) Outdoor Decorating
|
117 |
+
J) Remodeling & Construction
|
118 |
+
K) Smart Home
|
119 |
+
12) Medical Health
|
120 |
+
A) Diseases and Conditions
|
121 |
+
B) Medical Tests
|
122 |
+
C) Pharmaceutical Drugs
|
123 |
+
D) Surgery
|
124 |
+
E) Vaccines
|
125 |
+
13) Movies
|
126 |
+
A) Action and Adventure Movies
|
127 |
+
B) Animation Movies
|
128 |
+
C) Comedy Movies
|
129 |
+
D) Crime and Mystery Movies
|
130 |
+
E) Documentary Movies
|
131 |
+
F) Drama Movies
|
132 |
+
G) Family and Children Movies
|
133 |
+
H) Fantasy Movies
|
134 |
+
I) Horror Movies
|
135 |
+
J) Romance Movies
|
136 |
+
K) Science Fiction Movies
|
137 |
+
L) Special Interest Movies
|
138 |
+
14) Music and Audio
|
139 |
+
A) Adult Contemporary Music
|
140 |
+
B) Arts Podcasts
|
141 |
+
C) Blues
|
142 |
+
D) Business News Radio
|
143 |
+
E) Business Podcasts
|
144 |
+
F) Children's Music
|
145 |
+
G) Classic Hits
|
146 |
+
H) Classical Music
|
147 |
+
I) College Radio
|
148 |
+
J) Comedy Podcasts
|
149 |
+
K) Comedy Radio
|
150 |
+
L) Contemporary Hits
|
151 |
+
M) Country Music
|
152 |
+
N) Dance and Electronic Music
|
153 |
+
O) Education Podcasts
|
154 |
+
P) Folk Music
|
155 |
+
Q) Games & Hobbies Podcasts
|
156 |
+
R) Gospel Music
|
157 |
+
S) Health Podcasts
|
158 |
+
T) Hip Hop Music
|
159 |
+
U) Inspirational Music
|
160 |
+
V) International Music
|
161 |
+
W) Jazz
|
162 |
+
X) Kids & Family Podcasts
|
163 |
+
Y) News & Politics Podcasts
|
164 |
+
Z) Oldies Music
|
165 |
+
AA) Public Radio
|
166 |
+
AB) Reggae
|
167 |
+
AC) Religion & Spirituality Podcasts
|
168 |
+
AD) Religious Music
|
169 |
+
AE) Rhythm and Blues
|
170 |
+
AF) Rock Music
|
171 |
+
AG) Science & Medicine Podcasts
|
172 |
+
AH) Society & Culture Podcasts
|
173 |
+
AI) Soundtracks
|
174 |
+
AJ) Sports & Recreation Podcasts
|
175 |
+
AK) Sports Play-by-Play
|
176 |
+
AL) Sports Talk Radio
|
177 |
+
AM) Talk Radio
|
178 |
+
AN) Technology Podcasts
|
179 |
+
AO) TV & Film Podcasts
|
180 |
+
AP) Urban Adult Contemporary Music
|
181 |
+
AQ) Urban Contemporary Music
|
182 |
+
15) News and Politics
|
183 |
+
A) Crime
|
184 |
+
B) Disasters
|
185 |
+
C) International News
|
186 |
+
D) Law
|
187 |
+
E) Local News
|
188 |
+
F) National News
|
189 |
+
G) Politics
|
190 |
+
H) Weather
|
191 |
+
16) Personal Finance
|
192 |
+
A) Consumer Banking
|
193 |
+
B) Financial Assistance
|
194 |
+
C) Financial Planning
|
195 |
+
D) Frugal Living
|
196 |
+
E) Insurance
|
197 |
+
F) Personal Debt
|
198 |
+
G) Personal Investing
|
199 |
+
H) Personal Taxes
|
200 |
+
I) Retirement Planning
|
201 |
+
17) Pets
|
202 |
+
A) Birds
|
203 |
+
B) Cats
|
204 |
+
C) Dogs
|
205 |
+
D) Fish and Aquariums
|
206 |
+
E) Large Animals
|
207 |
+
F) Pet Adoptions
|
208 |
+
G) Reptiles
|
209 |
+
H) Veterinary Medicine
|
210 |
+
18) Pop Culture
|
211 |
+
A) Celebrity Deaths
|
212 |
+
B) Celebrity Families
|
213 |
+
C) elebrity Homes
|
214 |
+
D) Celebrity Pregnancy
|
215 |
+
E) Celebrity Relationships
|
216 |
+
F) Celebrity Scandal
|
217 |
+
G) Celebrity Style
|
218 |
+
19) Real Estate
|
219 |
+
A) Apartments
|
220 |
+
B) Developmental Sites
|
221 |
+
C) Hotel Properties
|
222 |
+
D) Houses
|
223 |
+
E) Industrial Property
|
224 |
+
F) Land and Farms
|
225 |
+
G) Office Property
|
226 |
+
H) Real Estate Buying and Selling
|
227 |
+
I) Real Estate Renting and Leasing
|
228 |
+
J) Retail Property
|
229 |
+
K) Vacation Properties
|
230 |
+
20) Religion & Spirituality
|
231 |
+
A) Agnosticism
|
232 |
+
B) Astrology
|
233 |
+
C) Atheism
|
234 |
+
D) Buddhism
|
235 |
+
E) Christianity
|
236 |
+
F) Hinduism
|
237 |
+
G) Islam
|
238 |
+
H) Judaism
|
239 |
+
I) Sikhism
|
240 |
+
J) Spirituality
|
241 |
+
21) Science
|
242 |
+
A) Biological Sciences
|
243 |
+
B) Chemistry
|
244 |
+
C) Environment
|
245 |
+
D) Genetics
|
246 |
+
E) Geography
|
247 |
+
F) Geology
|
248 |
+
G) Physics
|
249 |
+
H) Space and Astronomy
|
250 |
+
22) Shopping
|
251 |
+
A) Couponing
|
252 |
+
23) Sports
|
253 |
+
A) American Football
|
254 |
+
B) Australian Rules Football
|
255 |
+
C) Auto Racing
|
256 |
+
D) Badminton
|
257 |
+
E) Baseball
|
258 |
+
F) Basketball
|
259 |
+
G) Beach Volleyball
|
260 |
+
H) Bodybuiling
|
261 |
+
I) Bowling
|
262 |
+
J) Boxing
|
263 |
+
K) Cheerleading
|
264 |
+
L) College Sports
|
265 |
+
M) Cricket
|
266 |
+
N) Cycling
|
267 |
+
O) Darts
|
268 |
+
P) Disabled Sports
|
269 |
+
Q) Diving
|
270 |
+
R) Equine Sports
|
271 |
+
S) Extreme Sports
|
272 |
+
T) Fantasy Sports
|
273 |
+
U) Field Hockey
|
274 |
+
V) Figure Skating
|
275 |
+
W) Fishing Sports
|
276 |
+
X) Golf
|
277 |
+
Y) Gymnastics
|
278 |
+
Z) Hunting and Shooting
|
279 |
+
AA) Ice Hockey
|
280 |
+
AB) Inline Skating
|
281 |
+
AC) Lacrosse
|
282 |
+
AD) Martial Arts
|
283 |
+
AE) Olympic Sports
|
284 |
+
AF) Poker and Professional Gambling
|
285 |
+
AG) Rodeo
|
286 |
+
AH) Rowing
|
287 |
+
AI) Rugby
|
288 |
+
AJ) Sailing
|
289 |
+
AK) Skiing
|
290 |
+
AL) Snooker/Pool/Billiards
|
291 |
+
AM) Soccer
|
292 |
+
AN) Softball
|
293 |
+
AO) Squash
|
294 |
+
AP) Swimming
|
295 |
+
AQ) Table Tennis
|
296 |
+
AR) Tennis
|
297 |
+
AS) Track and Field
|
298 |
+
AT) Volleyball
|
299 |
+
AU) Walking
|
300 |
+
AV) Water Polo
|
301 |
+
AW) Weightlifting
|
302 |
+
AX) Wrestling
|
303 |
+
24) Style & Fashion
|
304 |
+
A) Beauty
|
305 |
+
B) Body Art
|
306 |
+
C) Children's Clothing
|
307 |
+
D) Designer Clothing
|
308 |
+
E) Fashion Trends
|
309 |
+
F) High Fashion
|
310 |
+
G) Men's Fashion
|
311 |
+
H) Personal Care
|
312 |
+
I) Street Style
|
313 |
+
J) Women's Fashion
|
314 |
+
25) Technology & Computing
|
315 |
+
A) Artificial Intelligence
|
316 |
+
B) Augmented Reality
|
317 |
+
C) Computing
|
318 |
+
D) Consumer Electronics
|
319 |
+
E) Robotics
|
320 |
+
F) Virtual RealityContent Taxonomy v2.0
|
321 |
+
26) Television
|
322 |
+
A) Animation TV
|
323 |
+
B) Children's TV
|
324 |
+
C) Comedy TV
|
325 |
+
D) Drama TV
|
326 |
+
E) Factual TV
|
327 |
+
F) Holiday TV
|
328 |
+
G) Music TV
|
329 |
+
H) Reality TV
|
330 |
+
I) Science Fiction TV
|
331 |
+
J) Soap Opera TV
|
332 |
+
K) Special Interest TV
|
333 |
+
L) Sports TV
|
334 |
+
27) Travel
|
335 |
+
A) Travel Accessories
|
336 |
+
B) Travel Locations
|
337 |
+
C) Travel Preparation
|
338 |
+
D) Travel Type
|
339 |
+
28) Video Gaming
|
340 |
+
A) Console Games
|
341 |
+
B) eSports
|
342 |
+
C) Mobile Games
|
343 |
+
D) PC Games
|
344 |
+
E) Video Game Genres
|
categories_json.txt
ADDED
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"Automotive": [
|
3 |
+
"Auto Body Styles",
|
4 |
+
"Auto Buying and Selling",
|
5 |
+
"Auto Insurance",
|
6 |
+
"Auto Parts",
|
7 |
+
"Auto Recalls",
|
8 |
+
"Auto Repair",
|
9 |
+
"Auto Safety",
|
10 |
+
"Auto Shows",
|
11 |
+
"Auto Technology",
|
12 |
+
"Auto Type",
|
13 |
+
"Car Culture",
|
14 |
+
"Dash Cam Videos",
|
15 |
+
"Motorcycles",
|
16 |
+
"Road-Side Assistance",
|
17 |
+
"Scooters"
|
18 |
+
],
|
19 |
+
"Books and Literature": [
|
20 |
+
"Art and Photography Books",
|
21 |
+
"Biographies",
|
22 |
+
"Children's Literature",
|
23 |
+
"Comics and Graphic Novels",
|
24 |
+
"Cookbooks",
|
25 |
+
"Fiction",
|
26 |
+
"Poetry",
|
27 |
+
"Travel Books",
|
28 |
+
"Young Adult Literature"
|
29 |
+
],
|
30 |
+
"Business and Finance": [
|
31 |
+
"Business",
|
32 |
+
"Economy",
|
33 |
+
"Industries"
|
34 |
+
],
|
35 |
+
"Careers": [
|
36 |
+
"Apprenticeships",
|
37 |
+
"Career Advice",
|
38 |
+
"Career Planning",
|
39 |
+
"Job Search",
|
40 |
+
"Telecommuting",
|
41 |
+
"Vocational Training"
|
42 |
+
],
|
43 |
+
"Education": [
|
44 |
+
"Adult Education",
|
45 |
+
"College Education",
|
46 |
+
"Early Childhood Education",
|
47 |
+
"Educational Assessment",
|
48 |
+
"Homeschooling",
|
49 |
+
"Homework and Study",
|
50 |
+
"Language Learning",
|
51 |
+
"Online Education",
|
52 |
+
"Primary Education",
|
53 |
+
"Private School",
|
54 |
+
"Secondary Education",
|
55 |
+
"Special Education"
|
56 |
+
],
|
57 |
+
"Family and Relationships": [
|
58 |
+
"Bereavement",
|
59 |
+
"Dating",
|
60 |
+
"Divorce",
|
61 |
+
"Eldercare",
|
62 |
+
"Marriage and Civil Unions",
|
63 |
+
"Parenting",
|
64 |
+
"Single Life"
|
65 |
+
],
|
66 |
+
"Fine Art": [
|
67 |
+
"Costume",
|
68 |
+
"Dance",
|
69 |
+
"Design",
|
70 |
+
"Digital Arts",
|
71 |
+
"Fine Art Photography",
|
72 |
+
"Modern Art",
|
73 |
+
"Opera",
|
74 |
+
"Theater"
|
75 |
+
],
|
76 |
+
"Food & Drink": [
|
77 |
+
"Alcoholic Beverages",
|
78 |
+
"Barbecues and Grilling",
|
79 |
+
"Cooking",
|
80 |
+
"Desserts and Baking",
|
81 |
+
"Dining Out",
|
82 |
+
"Food Allergies",
|
83 |
+
"Food Movements",
|
84 |
+
"Healthy Cooking and Eating",
|
85 |
+
"Non-Alcoholic Beverages",
|
86 |
+
"Vegan Diets",
|
87 |
+
"Vegetarian Diets",
|
88 |
+
"World Cuisines"
|
89 |
+
],
|
90 |
+
"Healthy Living": [
|
91 |
+
"Children's Health",
|
92 |
+
"Fitness and Exercise",
|
93 |
+
"Men's Health",
|
94 |
+
"Nutrition",
|
95 |
+
"Senior Health",
|
96 |
+
"Weight Loss",
|
97 |
+
"Wellness",
|
98 |
+
"Women's Health"
|
99 |
+
],
|
100 |
+
"Hobbies & Interests": [
|
101 |
+
"Antiquing and Antiques",
|
102 |
+
"Arts and Crafts",
|
103 |
+
"Beekeeping",
|
104 |
+
"Birdwatching",
|
105 |
+
"Cigars",
|
106 |
+
"Collecting",
|
107 |
+
"Content Production",
|
108 |
+
"Games and Puzzles",
|
109 |
+
"Genealogy and Ancestry",
|
110 |
+
"Magic and Illusion",
|
111 |
+
"Model Toys",
|
112 |
+
"Musical Instruments",
|
113 |
+
"Paranormal Phenomena",
|
114 |
+
"Radio Control",
|
115 |
+
"Sci-fi and Fantasy",
|
116 |
+
"Workshops and Classes"
|
117 |
+
],
|
118 |
+
"Home & Garden": [
|
119 |
+
"Gardening",
|
120 |
+
"Home Appliances",
|
121 |
+
"Home Entertaining",
|
122 |
+
"Home Improvement",
|
123 |
+
"Home Security",
|
124 |
+
"Indoor Environmental Quality",
|
125 |
+
"Interior Decorating",
|
126 |
+
"Landscaping",
|
127 |
+
"Outdoor Decorating",
|
128 |
+
"Remodeling & Construction",
|
129 |
+
"Smart Home"
|
130 |
+
],
|
131 |
+
"Medical Health": [
|
132 |
+
"Diseases and Conditions",
|
133 |
+
"Medical Tests",
|
134 |
+
"Pharmaceutical Drugs",
|
135 |
+
"Surgery",
|
136 |
+
"Vaccines"
|
137 |
+
],
|
138 |
+
"Movies": [
|
139 |
+
"Action and Adventure Movies",
|
140 |
+
"Animation Movies",
|
141 |
+
"Comedy Movies",
|
142 |
+
"Crime and Mystery Movies",
|
143 |
+
"Documentary Movies",
|
144 |
+
"Drama Movies",
|
145 |
+
"Family and Children Movies",
|
146 |
+
"Fantasy Movies",
|
147 |
+
"Horror Movies",
|
148 |
+
"Romance Movies",
|
149 |
+
"Science Fiction Movies",
|
150 |
+
"Special Interest Movies"
|
151 |
+
],
|
152 |
+
"Music and Audio": [
|
153 |
+
"Adult Contemporary Music",
|
154 |
+
"Arts Podcasts",
|
155 |
+
"Blues",
|
156 |
+
"Business News Radio",
|
157 |
+
"Business Podcasts",
|
158 |
+
"Children's Music",
|
159 |
+
"Classic Hits",
|
160 |
+
"Classical Music",
|
161 |
+
"College Radio",
|
162 |
+
"Comedy Podcasts",
|
163 |
+
"Comedy Radio",
|
164 |
+
"Contemporary Hits",
|
165 |
+
"Country Music",
|
166 |
+
"Dance and Electronic Music",
|
167 |
+
"Education Podcasts",
|
168 |
+
"Folk Music",
|
169 |
+
"Games & Hobbies Podcasts",
|
170 |
+
"Gospel Music",
|
171 |
+
"Health Podcasts",
|
172 |
+
"Hip Hop Music",
|
173 |
+
"Inspirational Music",
|
174 |
+
"International Music",
|
175 |
+
"Jazz",
|
176 |
+
"Kids & Family Podcasts",
|
177 |
+
"News & Politics Podcasts",
|
178 |
+
"Oldies Music",
|
179 |
+
"Public Radio",
|
180 |
+
"Reggae",
|
181 |
+
"Religion & Spirituality Podcasts",
|
182 |
+
"Religious Music",
|
183 |
+
"Rhythm and Blues",
|
184 |
+
"Rock Music",
|
185 |
+
"Science & Medicine Podcasts",
|
186 |
+
"Society & Culture Podcasts",
|
187 |
+
"Soundtracks",
|
188 |
+
"Sports & Recreation Podcasts",
|
189 |
+
"Sports Play-by-Play",
|
190 |
+
"Sports Talk Radio",
|
191 |
+
"Talk Radio",
|
192 |
+
"Technology Podcasts",
|
193 |
+
"TV & Film Podcasts",
|
194 |
+
"Urban Adult Contemporary Music",
|
195 |
+
"Urban Contemporary Music"
|
196 |
+
],
|
197 |
+
"News and Politics": [
|
198 |
+
"Crime",
|
199 |
+
"Disasters",
|
200 |
+
"International News",
|
201 |
+
"Law",
|
202 |
+
"Local News",
|
203 |
+
"National News",
|
204 |
+
"Politics",
|
205 |
+
"Weather"
|
206 |
+
],
|
207 |
+
"Personal Finance": [
|
208 |
+
"Consumer Banking",
|
209 |
+
"Financial Assistance",
|
210 |
+
"Financial Planning",
|
211 |
+
"Frugal Living",
|
212 |
+
"Insurance",
|
213 |
+
"Personal Debt",
|
214 |
+
"Personal Investing",
|
215 |
+
"Personal Taxes",
|
216 |
+
"Retirement Planning"
|
217 |
+
],
|
218 |
+
"Pets": [
|
219 |
+
"Birds",
|
220 |
+
"Cats",
|
221 |
+
"Dogs",
|
222 |
+
"Fish and Aquariums",
|
223 |
+
"Large Animals",
|
224 |
+
"Pet Adoptions",
|
225 |
+
"Reptiles",
|
226 |
+
"Veterinary Medicine"
|
227 |
+
],
|
228 |
+
"Pop Culture": [
|
229 |
+
"Celebrity Deaths",
|
230 |
+
"Celebrity Families",
|
231 |
+
"Celebrity Homes",
|
232 |
+
"Celebrity Pregnancy",
|
233 |
+
"Celebrity Relationships",
|
234 |
+
"Celebrity Scandal",
|
235 |
+
"Celebrity Style"
|
236 |
+
],
|
237 |
+
"Real Estate": [
|
238 |
+
"Apartments",
|
239 |
+
"Developmental Sites",
|
240 |
+
"Hotel Properties",
|
241 |
+
"Houses",
|
242 |
+
"Industrial Property",
|
243 |
+
"Land and Farms",
|
244 |
+
"Office Property",
|
245 |
+
"Real Estate Buying and Selling",
|
246 |
+
"Real Estate Renting and Leasing",
|
247 |
+
"Retail Property",
|
248 |
+
"Vacation Properties"
|
249 |
+
],
|
250 |
+
"Religion & Spirituality": [
|
251 |
+
"Agnosticism",
|
252 |
+
"Astrology",
|
253 |
+
"Atheism",
|
254 |
+
"Buddhism",
|
255 |
+
"Christianity",
|
256 |
+
"Hinduism",
|
257 |
+
"Islam",
|
258 |
+
"Judaism",
|
259 |
+
"Sikhism",
|
260 |
+
"Spirituality"
|
261 |
+
],
|
262 |
+
"Science": [
|
263 |
+
"Biological Sciences",
|
264 |
+
"Chemistry",
|
265 |
+
"Environment",
|
266 |
+
"Genetics",
|
267 |
+
"Geography",
|
268 |
+
"Geology",
|
269 |
+
"Physics",
|
270 |
+
"Space and Astronomy"
|
271 |
+
],
|
272 |
+
"Shopping": [
|
273 |
+
"CouponingContent Taxonomy v2.0"
|
274 |
+
],
|
275 |
+
"Sports": [
|
276 |
+
"American Football",
|
277 |
+
"Australian Rules Football",
|
278 |
+
"Auto Racing",
|
279 |
+
"Badminton",
|
280 |
+
"Baseball",
|
281 |
+
"Basketball",
|
282 |
+
"Beach Volleyball",
|
283 |
+
"Bodybuiling",
|
284 |
+
"Bowling",
|
285 |
+
"Boxing",
|
286 |
+
"Cheerleading",
|
287 |
+
"College Sports",
|
288 |
+
"Cricket",
|
289 |
+
"Cycling",
|
290 |
+
"Darts",
|
291 |
+
"Disabled Sports",
|
292 |
+
"Diving",
|
293 |
+
"Equine Sports",
|
294 |
+
"Extreme Sports",
|
295 |
+
"Fantasy Sports",
|
296 |
+
"Field Hockey",
|
297 |
+
"Figure Skating",
|
298 |
+
"Fishing Sports",
|
299 |
+
"Golf",
|
300 |
+
"Gymnastics",
|
301 |
+
"Hunting and Shooting",
|
302 |
+
"Ice Hockey",
|
303 |
+
"Inline Skating",
|
304 |
+
"Lacrosse",
|
305 |
+
"Martial Arts",
|
306 |
+
"Olympic Sports",
|
307 |
+
"Poker and Professional Gambling",
|
308 |
+
"Rodeo",
|
309 |
+
"Rowing",
|
310 |
+
"Rugby",
|
311 |
+
"Sailing",
|
312 |
+
"Skiing",
|
313 |
+
"Snooker/Pool/Billiards",
|
314 |
+
"Soccer",
|
315 |
+
"Softball",
|
316 |
+
"Squash",
|
317 |
+
"Swimming",
|
318 |
+
"Table Tennis",
|
319 |
+
"Tennis",
|
320 |
+
"Track and Field",
|
321 |
+
"Volleyball",
|
322 |
+
"Walking",
|
323 |
+
"Water Polo",
|
324 |
+
"Weightlifting",
|
325 |
+
"Wrestling"
|
326 |
+
],
|
327 |
+
"Style & Fashion": [
|
328 |
+
"Beauty",
|
329 |
+
"Body Art",
|
330 |
+
"Children's Clothing",
|
331 |
+
"Designer Clothing",
|
332 |
+
"Fashion Trends",
|
333 |
+
"High Fashion",
|
334 |
+
"Men's Fashion",
|
335 |
+
"Personal Care",
|
336 |
+
"Street Style",
|
337 |
+
"Women's Fashion"
|
338 |
+
],
|
339 |
+
"Technology & Computing": [
|
340 |
+
"Artificial Intelligence",
|
341 |
+
"Augmented Reality",
|
342 |
+
"Computing",
|
343 |
+
"Consumer Electronics",
|
344 |
+
"Robotics",
|
345 |
+
"Virtual RealityContent Taxonomy v2.0"
|
346 |
+
],
|
347 |
+
"Television": [
|
348 |
+
"Animation TV",
|
349 |
+
"Children's TV",
|
350 |
+
"Comedy TV",
|
351 |
+
"Drama TV",
|
352 |
+
"Factual TV",
|
353 |
+
"Holiday TV",
|
354 |
+
"Music TV",
|
355 |
+
"Reality TV",
|
356 |
+
"Science Fiction TV",
|
357 |
+
"Soap Opera TV",
|
358 |
+
"Special Interest TV",
|
359 |
+
"Sports TV"
|
360 |
+
],
|
361 |
+
"Travel": [
|
362 |
+
"Travel Accessories",
|
363 |
+
"Travel Locations",
|
364 |
+
"Travel Preparation",
|
365 |
+
"Travel Type"
|
366 |
+
],
|
367 |
+
"Video Gaming": [
|
368 |
+
"Console Games",
|
369 |
+
"eSports",
|
370 |
+
"Mobile Games",
|
371 |
+
"PC Games"
|
372 |
+
]
|
373 |
+
}
|
image_caption.py
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import argparse
|
2 |
+
from pathlib import Path
|
3 |
+
import os
|
4 |
+
from transformers import VisionEncoderDecoderModel, ViTImageProcessor, AutoTokenizer
|
5 |
+
import torch
|
6 |
+
from PIL import Image
|
7 |
+
|
8 |
+
|
9 |
+
class Caption:
|
10 |
+
def __init__(self):
|
11 |
+
self.model = VisionEncoderDecoderModel.from_pretrained(
|
12 |
+
"nlpconnect/vit-gpt2-image-captioning"
|
13 |
+
)
|
14 |
+
self.feature_extractor = ViTImageProcessor.from_pretrained(
|
15 |
+
"nlpconnect/vit-gpt2-image-captioning"
|
16 |
+
)
|
17 |
+
self.tokenizer = AutoTokenizer.from_pretrained(
|
18 |
+
"nlpconnect/vit-gpt2-image-captioning"
|
19 |
+
)
|
20 |
+
|
21 |
+
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
+
self.device = torch.device("cpu")
|
23 |
+
self.model.to(self.device)
|
24 |
+
self.max_length = 16
|
25 |
+
self.num_beams = 4
|
26 |
+
self.gen_kwargs = {"max_length": self.max_length, "num_beams": self.num_beams}
|
27 |
+
|
28 |
+
|
29 |
+
def predict_step(self,image_paths):
|
30 |
+
images = []
|
31 |
+
|
32 |
+
for image_path in image_paths:
|
33 |
+
i_image = Image.open(image_path)
|
34 |
+
if i_image.mode != "RGB":
|
35 |
+
i_image = i_image.convert(mode="RGB")
|
36 |
+
|
37 |
+
images.append(i_image)
|
38 |
+
|
39 |
+
pixel_values = self.feature_extractor(images=images, return_tensors="pt").pixel_values
|
40 |
+
pixel_values = pixel_values.to(self.device)
|
41 |
+
|
42 |
+
output_ids = self.model.generate(pixel_values, **self.gen_kwargs)
|
43 |
+
|
44 |
+
preds = self.tokenizer.batch_decode(output_ids, skip_special_tokens=True)
|
45 |
+
preds = [pred.strip() for pred in preds]
|
46 |
+
return preds
|
47 |
+
|
48 |
+
def get_args(self):
|
49 |
+
parser = argparse.ArgumentParser()
|
50 |
+
parser.add_argument( "-i",
|
51 |
+
"--input_img_paths",
|
52 |
+
type=str,
|
53 |
+
default="farmer.jpg",
|
54 |
+
help="img for caption")
|
55 |
+
|
56 |
+
args = parser.parse_args()
|
57 |
+
|
58 |
+
return args
|
59 |
+
|
60 |
+
if __name__ == "__main__":
|
61 |
+
model = Caption()
|
62 |
+
args = model.get_args()
|
63 |
+
image_paths = []
|
64 |
+
image_paths.append(args.input_img_paths)
|
65 |
+
print(model.predict_step(image_paths))
|
main_classes.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
['Automotive', 'Books and Literature', 'Business and Finance', 'Careers', 'Education', 'Families and Relationships', 'Fine Art', 'Food & Drink', 'Healthy Living', 'Hobbies & Interests', 'Home & Garden', 'Medical Health', 'Movies', 'Music and Audio', 'News and Politics', 'Personal Finance', 'Pets', 'Pop Culture', 'Real Estate', 'Religion & Spirituality', 'Science', 'Shopping', 'Sports', 'Style & Fashion', 'Technology & Computing', 'Television', 'Travel', 'Video Gaming']
|
sub_categories.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
1)Biological Sciences
|
2 |
+
2)Chemistry
|
3 |
+
3)Environment
|
4 |
+
4)Genetics
|
5 |
+
5)Geography
|
6 |
+
6)Geology
|
7 |
+
7)Physics
|
8 |
+
8)Space and Astronomy
|