panda1835 commited on
Commit
26268b3
·
0 Parent(s):
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ keras_model.h5 filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Vnturtle
3
+ emoji: 🔥
4
+ colorFrom: gray
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 3.2
8
+ app_file: app.py
9
+ pinned: false
10
+ license: cc-by-nc-4.0
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from keras.models import load_model
2
+ from PIL import Image, ImageOps
3
+ import numpy as np
4
+ import gradio as gr
5
+ import pandas as pd
6
+ import json
7
+ import os
8
+ import glob
9
+
10
+ # === READ AND LOAD FILES ===
11
+
12
+ folder = '.'
13
+
14
+ data = pd.read_csv(os.path.join(folder, 'species_info.csv'))
15
+
16
+ with open(os.path.join(folder, 'translation.json'), 'r') as f:
17
+ translation = json.load(f)
18
+
19
+ # Load the model
20
+ model = load_model(os.path.join(folder, 'keras_model.h5'))
21
+ # Load label file
22
+ with open(os.path.join(folder, 'labels.txt'),'r') as f:
23
+ labels = f.readlines()
24
+
25
+ # === GLOBAL VARIABLES ===
26
+ language = ''
27
+ article = ""
28
+
29
+
30
+ def format_label(label):
31
+ """
32
+ From '0 rùa khác\n' to 'rùa khác'
33
+ """
34
+ try:
35
+ int(label.split(' ')[0])
36
+ return label[label.find(" ")+1:-1]
37
+ except:
38
+ return label[:-1]
39
+
40
+ def get_name(scientific_name, lan):
41
+ """
42
+ Return name in Vietnamese
43
+ """
44
+ return data[data[f'scientific_name'] == scientific_name][f'name_{lan}'].to_list()[0]
45
+
46
+ def get_fun_fact(scientific_name, lan):
47
+ """
48
+ Return fun fact of the species
49
+ """
50
+ return data[data[f'scientific_name'] == scientific_name][f'fun_fact_{lan}'].to_list()[0]
51
+
52
+ def get_law(scientific_name):
53
+ cites = data[data['scientific_name'] == scientific_name]['CITES'].to_list()[0]
54
+ nd06 = data[data['scientific_name'] == scientific_name]['ND06'].to_list()[0]
55
+ return cites, nd06
56
+
57
+ def get_habitat(scientific_name, lan):
58
+ return data[data['scientific_name'] == scientific_name][f'habitat_{lan}'].to_list()[0]
59
+
60
+ def get_conservation_status(scientific_name, lan):
61
+ status_list = ['NE', 'DD', 'LC', 'NT', 'VU', 'EN', 'CR', 'EW', 'EX']
62
+ status = data[data['scientific_name'] == scientific_name]['IUCN'].to_list()[0]
63
+ for s in status_list:
64
+ if s in status:
65
+ return translation['conservation_status'][s][lan]
66
+
67
+ def get_language_code(lan):
68
+ global language
69
+ if lan == "Tiếng Việt":
70
+ language = 'vi'
71
+ if lan == "English":
72
+ language = 'en'
73
+
74
+ return language
75
+
76
+ def get_species_list():
77
+ """
78
+ Example:
79
+ ['Indotestudo elongata',
80
+ 'Cuora galbinifrons',
81
+ 'Cuora mouhotii',
82
+ 'Cuora bourreti']
83
+ """
84
+ return [format_label(s) for s in labels]
85
+
86
+ def get_species_abbreviation(scientific_name):
87
+ return "".join([s[0] for s in scientific_name.split()])
88
+
89
+ def get_species_abbreviation_list():
90
+ """
91
+ Example:
92
+ ['Ie', 'Cg', 'Cm', 'Cb']
93
+ """
94
+ return [get_species_abbreviation(s) for s in get_species_list()]
95
+
96
+ def get_description(language):
97
+ num_class = len(labels)
98
+ num_native = 0
99
+ num_non_native = 0
100
+
101
+ native_list = ''
102
+ non_native_list = ''
103
+
104
+ for i in labels:
105
+ label = format_label(i)
106
+ if label in data[data.native == 'y'].scientific_name.values:
107
+ num_native += 1
108
+ native_list += f"({num_native}) {get_name(label, language)}, "
109
+ else:
110
+ num_non_native += 1
111
+ non_native_list += f"({num_non_native}) {get_name(label, language)}, "
112
+
113
+ if language=='vi':
114
+ description=f"""
115
+ VNTurtle nhận diện các loài rùa Việt Nam. Mô hình này có thể nhận diện **{num_class}** loại rùa thường xuất hiện ở VN gồm
116
+ - **{num_native}** loài bản địa: {native_list} \n\n
117
+ - **{num_non_native}** loài ngoại lai: {non_native_list}
118
+ """
119
+ if language=='en':
120
+ description=f"""
121
+ VNTurtle can recognize turtle species in Vietnam. This model can identify {num_class} common turtles in Vietnam including **{num_native}** native species \n\n
122
+ {native_list} \n\n
123
+ and **{num_non_native}** non-native species \n\n
124
+ {non_native_list}
125
+ """
126
+ return description
127
+
128
+ def update_language(language):
129
+ language = get_language_code(language)
130
+ return get_description(language), \
131
+ translation['label']['label_run_btn'][language], \
132
+ translation["accordion"]["fun_fact"][language], \
133
+ translation["accordion"]["status"][language], \
134
+ translation["accordion"]["law"][language], \
135
+ translation["accordion"]["info"][language]
136
+
137
+ def predict(image):
138
+ # Create the array of the right shape to feed into the keras model
139
+ # The 'length' or number of images you can put into the array is
140
+ # determined by the first position in the shape tuple, in this case 1.
141
+ data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32)
142
+ #resize the image to a 224x224 with the same strategy as in TM2:
143
+ #resizing the image to be at least 224x224 and then cropping from the center
144
+ size = (224, 224)
145
+ image = ImageOps.fit(image, size, Image.ANTIALIAS)
146
+
147
+ #turn the image into a numpy array
148
+ image_array = np.asarray(image)
149
+ # Normalize the image
150
+ normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
151
+ # Load the image into the array
152
+ data[0] = normalized_image_array
153
+
154
+ # run the inference
155
+ pred = model.predict(data)
156
+ pred = pred.tolist()
157
+
158
+ return pred
159
+
160
+ result = {}
161
+ best_prediction = ''
162
+
163
+ def interpret_prediction(prediction):
164
+ global result
165
+
166
+ sorted_index = np.argsort(prediction).tolist()[0]
167
+
168
+ display_index = []
169
+ for i in sorted_index[::-1]:
170
+ if prediction[0][i] > 0.01:
171
+ display_index.append(i)
172
+
173
+ # best_prediction = format_label(labels[sorted_index[-1]]).strip()
174
+
175
+ result = {format_label(labels[i]): round(prediction[0][i],2) for i in display_index}
176
+
177
+ # return best_prediction
178
+
179
+ def run_btn_click(image):
180
+ global best_prediction
181
+ best_prediction = None
182
+ global article
183
+ article = translation["info"]["ATP_contact"][language]
184
+
185
+ interpret_prediction(predict(image))
186
+
187
+ visible_result = [
188
+ False,
189
+ False,
190
+ False,
191
+ False,
192
+ False
193
+ ]
194
+
195
+ image_result = [
196
+ os.path.join(folder, 'examples', 'empty.JPG'),
197
+ os.path.join(folder, 'examples', 'empty.JPG'),
198
+ os.path.join(folder, 'examples', 'empty.JPG'),
199
+ os.path.join(folder, 'examples', 'empty.JPG'),
200
+ os.path.join(folder, 'examples', 'empty.JPG')
201
+ ]
202
+
203
+ percent_result = [
204
+ "",
205
+ "",
206
+ "",
207
+ "",
208
+ ""
209
+ ]
210
+
211
+ species_result = [
212
+ "",
213
+ "",
214
+ "",
215
+ "",
216
+ ""
217
+ ]
218
+
219
+ for i, (species, percent) in enumerate(result.items()):
220
+ print(species, result)
221
+ visible_result[i] = True
222
+ image_result[i] = os.path.join(folder, 'examples', f'test_{get_species_abbreviation(species)}.JPG')
223
+ percent_result[i] = f'{round(percent*100)}%'
224
+ species_result[i] = species
225
+
226
+ return gr.Accordion.update(open=True, visible=True), \
227
+ gr.Image.update(value=image_result[0], visible=visible_result[0]), \
228
+ gr.HighlightedText.update(value=[('', percent_result[0])], label=species_result[0], visible=visible_result[0]), \
229
+ gr.Button.update(visible=visible_result[0]), \
230
+ \
231
+ gr.Image.update(value=image_result[1], visible=visible_result[1]), \
232
+ gr.HighlightedText.update(value=[('', percent_result[1])], label=species_result[1], visible=visible_result[1]), \
233
+ gr.Button.update(visible=visible_result[1]), \
234
+ \
235
+ gr.Image.update(value=image_result[2], visible=visible_result[2]), \
236
+ gr.HighlightedText.update(value=[('', percent_result[2])], label=species_result[2], visible=visible_result[2]), \
237
+ gr.Button.update(visible=visible_result[2]), \
238
+ \
239
+ gr.Image.update(value=image_result[3], visible=visible_result[3]), \
240
+ gr.HighlightedText.update(value=[('', percent_result[3])], label=species_result[3], visible=visible_result[3]), \
241
+ gr.Button.update(visible=visible_result[3]), \
242
+ \
243
+ gr.Image.update(value=image_result[4], visible=visible_result[4]), \
244
+ gr.HighlightedText.update(value=[('', percent_result[4])], label=species_result[4], visible=visible_result[4]), \
245
+ gr.Button.update(visible=visible_result[4]), \
246
+ gr.Accordion.update(visible=False), \
247
+ []
248
+ # gr.Accordion.update(visible=False), \
249
+ # gr.Accordion.update(visible=False), \
250
+ # gr.Accordion.update(visible=False), \
251
+ # gr.Accordion.update(visible=False), \
252
+ # gr.Markdown.update(value=percent_result[4], visible=visible_result[4]), \
253
+
254
+
255
+ def get_image_gallery_species_1():
256
+ global best_prediction
257
+ for i, name in enumerate(result):
258
+ if i == 0:
259
+ best_prediction = name
260
+ return glob.glob(os.path.join(folder, 'gallery', name, '*'))
261
+
262
+ def get_image_gallery_species_2():
263
+ global best_prediction
264
+ for i, name in enumerate(result):
265
+ if i == 1:
266
+ best_prediction = name
267
+ return glob.glob(os.path.join(folder, 'gallery', name, '*'))
268
+
269
+ def get_image_gallery_species_3():
270
+ global best_prediction
271
+ for i, name in enumerate(result):
272
+ if i == 2:
273
+ best_prediction = name
274
+ return glob.glob(os.path.join(folder, 'gallery', name, '*'))
275
+
276
+ def get_image_gallery_species_4():
277
+ global best_prediction
278
+ for i, name in enumerate(result):
279
+ if i == 3:
280
+ best_prediction = name
281
+ return glob.glob(os.path.join(folder, 'gallery', name, '*'))
282
+
283
+ def get_image_gallery_species_5():
284
+ global best_prediction
285
+ for i, name in enumerate(result):
286
+ if i == 4:
287
+ best_prediction = name
288
+ return glob.glob(os.path.join(folder, 'gallery', name, '*'))
289
+
290
+ def display_info():
291
+ cites, nd06 = get_law(best_prediction)
292
+
293
+ fun_fact = f"{get_fun_fact(best_prediction, language)}."
294
+
295
+ status = f"{get_conservation_status(best_prediction, language)}"
296
+
297
+ law = f'CITES: {cites}, NĐ06: {nd06}'
298
+
299
+ info = ""
300
+
301
+ if str(nd06) != "":
302
+ law_protection = translation["info"]["law_protection"][language]
303
+ report = translation["info"]["report"][language]
304
+ deliver = translation["info"]["deliver"][language]
305
+ release = translation["info"]["release"][language] + f" **{get_habitat(best_prediction, language)}**"
306
+
307
+ info = f"- {law_protection}\n\n- {report}\n\n- {deliver}\n\n- {release}"
308
+
309
+ return gr.Accordion.update(visible=True), \
310
+ gr.Accordion.update(open=False), \
311
+ gr.Accordion.update(visible=True), \
312
+ gr.Accordion.update(visible=True), \
313
+ gr.Accordion.update(visible=True), \
314
+ gr.Accordion.update(visible=True), \
315
+ fun_fact, status, law, info
316
+
317
+ default_lan = 'Tiếng Việt'
318
+
319
+ with gr.Blocks() as demo:
320
+ gr.Markdown("# VNTurtle")
321
+ radio_lan = gr.Radio(choices=['Tiếng Việt', 'English'], value=default_lan, label='Ngôn ngữ/Language', show_label=True, interactive=True)
322
+ md_des = gr.Markdown(get_description(get_language_code(default_lan)))
323
+
324
+ with gr.Row():
325
+ inp = gr.Image(type="pil", show_label=True, label='Ảnh tải lên', interactive=True)
326
+ gallery = gr.Gallery(show_label=True, label='Ảnh đối chiếu')
327
+ with gr.Row():
328
+ run_btn = gr.Button(translation['label']['label_run_btn'][get_language_code(default_lan)])
329
+ result_verify_btn = gr.Button(translation['label']['label_verify_btn'][get_language_code(default_lan)], visible=True)
330
+
331
+ accordion_result_section = gr.Accordion(translation["accordion"]["result_section"][get_language_code(default_lan)], open=True, visible=False)
332
+
333
+ with accordion_result_section:
334
+ with gr.Row() as display_result:
335
+ with gr.Column(scale=0.2, min_width=150) as result_1:
336
+ result_percent_1 = gr.HighlightedText(show_label=True, visible=False).style(color_map={f'{i}%': 'green' for i in range(101)})
337
+ # result_percent_1 = gr.Markdown("", visible=False)
338
+ result_img_1 = gr.Image(interactive=False, visible=False, show_label=False)
339
+ result_view_btn_1 = gr.Button(translation['label']['label_check_btn'][get_language_code(default_lan)], visible=False)
340
+ with gr.Column(scale=0.2, min_width=150) as result_2:
341
+ result_percent_2 = gr.HighlightedText(show_label=True, visible=False).style(color_map={f'{i}%': 'yellow' for i in range(101)})
342
+ result_img_2 = gr.Image(interactive=False, visible=False, show_label=False)
343
+ result_view_btn_2 = gr.Button(translation['label']['label_check_btn'][get_language_code(default_lan)], visible=False)
344
+ with gr.Column(scale=0.2, min_width=150) as result_3:
345
+ result_percent_3 = gr.HighlightedText(show_label=True, visible=False).style(color_map={f'{i}%': 'orange' for i in range(101)})
346
+ result_img_3 = gr.Image(interactive=False, visible=False, show_label=False)
347
+ result_view_btn_3 = gr.Button(translation['label']['label_check_btn'][get_language_code(default_lan)], visible=False)
348
+ with gr.Column(scale=0.2, min_width=150) as result_4:
349
+ result_percent_4 = gr.HighlightedText(show_label=True, visible=False).style(color_map={f'{i}%': 'chocolate' for i in range(101)})
350
+ result_img_4 = gr.Image(interactive=False, visible=False, show_label=False)
351
+ result_view_btn_4 = gr.Button(translation['label']['label_check_btn'][get_language_code(default_lan)], visible=False)
352
+ with gr.Column(scale=0.2, min_width=150) as result_5:
353
+ result_percent_5 = gr.HighlightedText(show_label=True, visible=False).style(color_map={f'{i}%': 'grey' for i in range(101)})
354
+ result_img_5 = gr.Image(interactive=False, visible=False, show_label=False)
355
+ result_view_btn_5 = gr.Button(translation['label']['label_check_btn'][get_language_code(default_lan)], visible=False)
356
+
357
+ accordion_info_section = gr.Accordion(translation['accordion']['info_section'][get_language_code(default_lan)], visible=False, open=True)
358
+
359
+ with accordion_info_section:
360
+ accordion_fun_fact = gr.Accordion(translation["accordion"]["fun_fact"][get_language_code(default_lan)], open=False, visible=False)
361
+ accordion_status = gr.Accordion(translation["accordion"]["status"][get_language_code(default_lan)], open=False, visible=False)
362
+ accordion_law = gr.Accordion(translation["accordion"]["law"][get_language_code(default_lan)], open=False, visible=False)
363
+ accordion_info = gr.Accordion(translation["accordion"]["info"][get_language_code(default_lan)], open=False, visible=False)
364
+
365
+ with accordion_fun_fact:
366
+ md_fun_fact = gr.Markdown()
367
+ with accordion_status:
368
+ md_status = gr.Markdown()
369
+ with accordion_law:
370
+ md_law = gr.Markdown()
371
+ with accordion_info:
372
+ md_info = gr.Markdown()
373
+
374
+ gr.Markdown("---")
375
+ with gr.Accordion("🌅 Ảnh thử nghiệm", open=False):
376
+ gr.Examples(
377
+ examples=[[os.path.join(folder, 'examples', f'test_{get_species_abbreviation(s)}.JPG'), get_name(s, language)] for s in get_species_list()],
378
+ inputs=[inp],
379
+ label=""
380
+ )
381
+ radio_lan.change(fn=update_language, inputs=[radio_lan], outputs=[
382
+ md_des,
383
+ run_btn,
384
+ accordion_fun_fact,
385
+ accordion_status,
386
+ accordion_law,
387
+ accordion_info
388
+ ])
389
+ run_btn.click(fn=run_btn_click, inputs=inp, outputs= [
390
+ accordion_result_section,
391
+ # md_fun_fact, md_status, md_law, md_info,
392
+ result_img_1, result_percent_1, result_view_btn_1,
393
+ result_img_2, result_percent_2, result_view_btn_2,
394
+ result_img_3, result_percent_3, result_view_btn_3,
395
+ result_img_4, result_percent_4, result_view_btn_4,
396
+ result_img_5, result_percent_5, result_view_btn_5,
397
+ # accordion_fun_fact, accordion_status, accordion_law, accordion_info,
398
+ accordion_info_section,
399
+ gallery
400
+ ], show_progress=True, scroll_to_output=True)
401
+
402
+ result_view_btn_1.click(fn=get_image_gallery_species_1, outputs=gallery)
403
+ result_view_btn_2.click(fn=get_image_gallery_species_2, outputs=gallery)
404
+ result_view_btn_3.click(fn=get_image_gallery_species_3, outputs=gallery)
405
+ result_view_btn_4.click(fn=get_image_gallery_species_4, outputs=gallery)
406
+ result_view_btn_5.click(fn=get_image_gallery_species_5, outputs=gallery)
407
+
408
+ result_verify_btn.click(fn=display_info, outputs=[
409
+ accordion_info_section,
410
+ accordion_result_section,
411
+ accordion_fun_fact,
412
+ accordion_status,
413
+ accordion_law,
414
+ accordion_info,
415
+ md_fun_fact,
416
+ md_status,
417
+ md_law,
418
+ md_info,
419
+ ], scroll_to_output=True)
420
+
421
+ demo.launch(debug=False)
examples/empty.JPG ADDED
examples/test_Cb.JPG ADDED
examples/test_Cg.JPG ADDED
examples/test_Cm.JPG ADDED
examples/test_Ie.JPG ADDED
gallery/Cuora bourreti/1 body.JPG ADDED
gallery/Cuora bourreti/2 carapace.png ADDED
gallery/Cuora bourreti/3 side.png ADDED
gallery/Cuora bourreti/4 plastron.png ADDED
gallery/Cuora galbinifrons/1 body.JPG ADDED
gallery/Cuora galbinifrons/2 carapace.png ADDED
gallery/Cuora galbinifrons/3 side.png ADDED
gallery/Cuora galbinifrons/4 plastron.png ADDED
gallery/Cuora galbinifrons/5 other_1.png ADDED
gallery/Cuora mouhotii/1 body.JPG ADDED
gallery/Cuora mouhotii/2 carapace.png ADDED
gallery/Cuora mouhotii/3 side.png ADDED
gallery/Cuora mouhotii/4 plastron.png ADDED
gallery/Cuora mouhotii/5 other_1.png ADDED
gallery/Indotestudo elongata/1 body.JPG ADDED
gallery/Indotestudo elongata/2 carapace.png ADDED
gallery/Indotestudo elongata/3 side.png ADDED
gallery/Indotestudo elongata/4 plastron.png ADDED
gallery/Indotestudo elongata/5 other_1.png ADDED
keras_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:598a878e41ef81612a7b74d9af364629b944bd9692c625028c54e48c115bc059
3
+ size 2453440
labels.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Indotestudo elongata
2
+ Cuora galbinifrons
3
+ Cuora mouhotii
4
+ Cuora bourreti
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ tensorflow
2
+ Pillow
3
+ numpy
4
+ pandas
species_info.csv ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ scientific_name,name_vi,name_en,native,food_in_enclosure,enclosure_design,family_vn,habitat_vi,habitat_en,fun_fact_vi,fun_fact_en,other_name_vi,other_name_en,family_en,IUCN,SDVN,CITES,LDT,ND06,ND160,ND26
2
+ Platysternon megacephalum,Rùa đầu to,Big-headed Turtle,y,,,Họ rùa đầu to,,,,,,,Platysternidae,CR (2021),EN,I,X,IB,X,X
3
+ Cuora amboinensis,Rùa hộp lưng đen,Malayan Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2020),VU,II,,IIB,,
4
+ Cuora galbinifrons,Rùa hộp trán vàng miền Bắc,Indochinese Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2020),EN,II,X,IB,X,X
5
+ Cuora bourreti,Rùa hộp trán vàng miền Trung,Bourret’s Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2020),EN,I,,IB,X,
6
+ Cuora picturata,Rùa hộp trán vàng miền Nam,Southern Vietnam Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2020),EN,I,,IB,X,
7
+ Cuora mouhotii,Rùa sa nhân,Keeled Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2020),,II,,IIB,,
8
+ Cuora cyclornata,Rùa hộp ba vạch,Vietnamese Three-striped Box Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2020),CR,II,X,IB,X,X
9
+ Cyclemys oldhamii,Rùa đất Sê-pôn,Southern Asian Leaf Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2021),,II,,IIB,,
10
+ Cyclemys pulchristriata,Rùa đất Pul-kin,Eastern Black-bridged Leaf Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2021),,II,,IIB,,
11
+ Cyclemys atripons,Rùa đất A-tri-pôn,Western Black-bridged Leaf Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2021),,II,,,,
12
+ Geoemyda spengleri,Rùa đất Speng-lơ,Black-breasted Leaf Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2020),,II,,IIB,,
13
+ Heosemys grandis,Rùa đất lớn,Giant Asian Pond Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2021),VU,II,,IIB,,
14
+ Heosemys annandalii,Rùa răng,Yellow-headed Temple Turtle,y,,,Họ rùa đầm,,,Rùa răng là loài rùa duy nhất ở VN có khứa ở hàm trên giống răng ở người,The Yellow-headed Temple Turtle is the only species in Vietnam that has a tooth-like notch in the upper jaw,,,Geoemydidae,CR (2021),EN,II,,IIB,,
15
+ Malayemys subtrijuga,Rùa ba gờ,Mekong Snail-eating Turtle,y,,,Họ rùa đầm,,,Rùa 3 gờ là loài hay xiên xẹo không có căn cứ vì chúng rất thích ăn ốc ( Ăn ốc nói mò),,,,Geoemydidae,NT (2021),VU,II,,IIB,,
16
+ Mauremys annamensis,Rùa Trung Bộ,Vietnamese Pond Turtle,y,,,Họ rùa đầm,,,Rùa Trung Bộ là loài đặc hữu chỉ sinh sống ở Việt Nam,The Vietnamese Pond Turtle is an endemic species that only lives in Vietnam,,,Geoemydidae,CR (2020),CR,I,X,IB,X,X
17
+ Mauremys mutica,Rùa câm,Asian Yellow Pond Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2021),,II,,IIB,,
18
+ Mauremys sinensis,Rùa cổ sọc,Chinese Striped-neck Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2021),,III,,,,
19
+ Sacalia quadriocellata,Rùa bốn mắt,Four-eyed Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,CR (2021),,II,,IIB,,
20
+ Siebenrockiella crassicollis,Rùa cổ bự,Black Marsh Turtle,y,,,Họ rùa đầm,,,,,,,Geoemydidae,EN (2021),,II,,IIB,,
21
+ Indotestudo elongata,Rùa núi vàng,Elongated Tortoise,y,,,Họ rùa cạn/rùa núi,,,"Rùa núi vàng là loài duy nhất ở VN có hình dạng mai thuôn dài, nhiều nơi người dân địa gọi loài rùa này là rùa gối vì hình dạng mai của chúng","The Elongated Tortoise is the only species in Vietnam with an elongated shell, thus many places call it Pillow tortoise because of its shell shape.",,,Testudinidae,CR (2019),EN,II,,IIB,,
22
+ Manouria impressa,Rùa núi viền,Impressed Tortoise,y,,,Họ rùa cạn/rùa núi,,,"Rùa núi viền là loài rùa duy nhất ở VN có hai ""cựa"" mọc ở hai bên đùi sau, có hình dạng giống đuôi. Vì thế, rùa núi viền còn có tên gọi là rùa 3 đuôi ở một số nơi","The Impressed Tortoise is the only turtle in Vietnam that has two ""spikes"" growing on the sides of the hind thighs, shaped like a tail. Therefore, it is also called the 3-tailed turtle in some places",,,Testudinidae,EN (2021),VU,II,,IIB,,
23
+ Amyda ornata,Ba ba Nam Bộ,Asiatic Softshell Turtle,y,,,Họ rùa mai mềm/ba ba,,,,,,,Trionychidae,VU (2016),VU,II,,IIB,,
24
+ Palea steindachneri,Ba ba gai,Wattle-necked Softshell Turtle,y,,,Họ rùa mai mềm/ba ba,,,,,,,Trionychidae,CR (2021),VU,II,,IIB,,
25
+ Pelochelys cantorii,Giải,Cantor’s Giant Softshell Turtle,y,,,Họ rùa mai mềm/ba ba,,,,,,,Trionychidae,CR (2021),EN,II,X,IB,X,X
26
+ Pelodiscus variegatus,Ba ba bụng đốm,Spotted Softshell Turtle,y,,,Họ rùa mai mềm/ba ba,,,,,,,Trionychidae,,,,,,,
27
+ Rafetus swinhoei,Giải Sin-hoe,Swinhoe’s Softshell Turtle,y,,,Họ rùa mai mềm/ba ba,,,,,,,Trionychidae,CR (2021),CR,II,X,IB,X,X
28
+ Chelonoidis carbonarius,,,n,,,,,,,,,,,,,,,,,
29
+ Centrochelys sulcata,Rùa Sulcata,,n,,,,,,,,,,,,,,,,,
30
+ Chelydra serpentina,Rùa đớp,,n,,,,,,,,,,,,,,,,,
31
+ Graptemys pseudogeographica,,,n,,,,,,,,,,,,,,,,,
32
+ Macrochelys temminckii,Rùa cá sấu,,n,,,,,,,,,,,,,,,,,
33
+ Mauremys reevesii,Rùa đầm Trung Quốc,,n,,,,,,,,,,,,,,,,,
34
+ Podocnemis unifilis,,,n,,,,,,,,,,,,,,,,,
35
+ Trachemys scripta,Rùa tai đỏ,,n,,,,,,,,,,,,,,,,,
36
+ Geoclemys hamiltonii,Rùa ao đen,,n,,,,,,,,,,,,,,,,,
translation.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "conservation_status": {
3
+ "NE": {
4
+ "vi": "Không được đánh giá",
5
+ "en": "Not Evaluated"
6
+ },
7
+ "DD": {
8
+ "vi": "Thiếu dữ liệu",
9
+ "en": "Data Deficient"
10
+ },
11
+ "LC": {
12
+ "vi": "Ít quan tâm",
13
+ "en": "Least Concern"
14
+ },
15
+ "NT": {
16
+ "vi": "Sắp bị đe dọa",
17
+ "en": "Near Threatened"
18
+ },
19
+ "VU": {
20
+ "vi": "Sắp nguy cấp",
21
+ "en": "Vulnerable"
22
+ },
23
+ "EN": {
24
+ "vi": "Nguy cấp",
25
+ "en": "Endangered"
26
+ },
27
+ "CR": {
28
+ "vi": "Cực kỳ nguy cấp",
29
+ "en": "Critically Endangered"
30
+ },
31
+ "EW": {
32
+ "vi": "Tuyệt chủng trong tự nhiên",
33
+ "en": "Extinct in the Wild"
34
+ },
35
+ "EX": {
36
+ "vi": "Tuyệt chủng",
37
+ "en": "Extinct"
38
+ }
39
+ },
40
+
41
+ "accordion": {
42
+ "result_section": {
43
+ "vi": "🗂 Kết Quả",
44
+ "en": "🗂 Results"
45
+ },
46
+
47
+ "info_section": {
48
+ "vi": "ℹ Thông tin",
49
+ "en": "ℹ Information"
50
+ },
51
+
52
+ "fun_fact": {
53
+ "vi": "🤔 Bạn có biết?",
54
+ "en": "🤔 Did you know?"
55
+ },
56
+
57
+ "status": {
58
+ "vi": "🐢 Tình trạng bảo tồn",
59
+ "en": "🐢 Conservation status"
60
+ },
61
+
62
+ "law": {
63
+ "vi": "👮‍♀️ Luật",
64
+ "en": "👮‍♀️ Law"
65
+ },
66
+
67
+ "info": {
68
+ "vi": "🥸 Bạn cần làm gì khi bắt gặp?",
69
+ "en": "🥸 What do you need to do when you come across?"
70
+ }
71
+ },
72
+
73
+ "info": {
74
+ "law_protection": {
75
+ "vi": "Đây là loài được pháp luật bảo vệ. Mọi hành vi buôn bán, nuôi nhốt không có [giấy phép](https://thuvienphapluat.vn/van-ban/Tai-nguyen-Moi-truong/Nghi-dinh-06-2019-ND-CP-quan-ly-thuc-vat-rung-dong-vat-rung-nguy-cap-quy-hiem-405883.aspx) đều vi phạm pháp luật",
76
+ "en": "This species is protected by law. All acts of trafficking and captive breeding without [authority permisison](https://thuvienphapluat.vn/van-ban/Tai-nguyen-Moi-truong/Nghi-dinh-06-2019-ND-CP-quan-ly-thuc-vat-rung-dong-vat-rung-nguy-cap-quy-hiem-405883.aspx) are illegal"
77
+ },
78
+
79
+ "report": {
80
+ "vi": "Nếu bạn vô tình bắt gặp loài này bị buôn bán mà không có giấy phép, tuyệt đối không mua nhằm bất kỳ mục đích gì (ví dụ để phóng sinh) mà nên báo cáo vi phạm tại đường dây nóng bảo vệ DVHD của ENV **1800-1522**.",
81
+ "en": "If you happen to come across this species being traded without a license, do not buy for any purpose (e.g., to release). Instead, you should report the suspicious act to ENV via their hotline **1800-1522**."
82
+ },
83
+
84
+ "deliver": {
85
+ "vi": "Nếu bạn đang nuôi thì nên giao nộp cho cơ quan chức năng để trả về tự nhiên. Tham khảo đơn vị tiếp nhận DVHD ở địa phương bạn tại [đây](https://drive.google.com/file/d/1K2ZWcHKGEsNudh_LtHgHJOXlVw-GQ6AZ/view).",
86
+ "en": "If you are raising them, you should hand them over to the authorities to return to the wild. Find your local wild-animal receiver [here](https://drive.google.com/file/d/1K2ZWcHKGEsNudh_LtHgHJOXlVw-GQ6AZ/view)."
87
+ },
88
+
89
+ "release": {
90
+ "vi": "Nếu bạn bắt gặp trong vườn nhà thì có thể xem xét thả chúng về môi trường sống. Hãy đảm bảo nơi bạn thả là",
91
+ "en": "If you find them in your garden, consider releasing them back into their habitat. Please make sure the place you release is"
92
+ },
93
+
94
+ "ATP_contact": {
95
+ "vi": "Liên hệ Chương trình Bảo tồn Rùa châu Á ([ATP](https://asianturtleprogram.org/vi/)) qua email: info@asianturtleprogram.org hoặc [Facebook](https://www.facebook.com/search/top?q=asian%20turtle%20program) để được hướng dẫn trong các trường hợp cụ thể",
96
+ "en": "Contact Asian Turtle Program ([ATP](https://asianturtleprogram.org/)) via email (info@asianturtleprogram.org) or [Facebook](https://www.facebook.com/search/top?q=asian%20turtle%20program) for instructions in specific cases."
97
+ }
98
+ },
99
+
100
+ "label": {
101
+ "label_inp_img": {
102
+ "vi": "Ảnh đầu vào",
103
+ "en": "Input Image"
104
+ },
105
+
106
+ "label_out_pred": {
107
+ "vi": "Kết quả",
108
+ "en": "Predictions"
109
+ },
110
+
111
+ "label_run_btn": {
112
+ "vi": "🤖 Nhận dạng",
113
+ "en": "🤖 Identify"
114
+ },
115
+
116
+ "label_check_btn": {
117
+ "vi": "🔎 Đối chiếu",
118
+ "en": "🔎 Compare"
119
+ },
120
+ "label_verify_btn": {
121
+ "vi": "✅ Xác nhận để xem thông tin",
122
+ "en": "✅ Verify to read information"
123
+ }
124
+ }
125
+
126
+
127
+
128
+
129
+ }