├── README.md
├── backend
├── features.py
├── flask_backend.py
├── generate_caption.py
├── text.py
├── train.py
└── vgg16.py
├── captioner
├── .gitignore
├── .metadata
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── captioner
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── fonts
│ ├── Montserrat-Regular.ttf
│ ├── OpenSans-Regular.ttf
│ ├── Raleway-Regular.ttf
│ └── Roboto-Regular.ttf
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── api.dart
│ ├── home.dart
│ ├── main.dart
│ └── result_page.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
└── images
├── demo.gif
└── workflow.JPG
/README.md:
--------------------------------------------------------------------------------
1 | # Image Captioning app 📷
2 |
3 | ---
4 |
5 | `Build-A-Bit` `Concetto 19`
6 |
7 | Team Name : The Unknowns
8 |
9 | ---
10 |
11 |
12 | ## Problem Overview
13 |
14 | Blindness makes life rather difficult for people who suffer from this health problem, but the use of technology can help in some day-to-day tasks. In this context, the present work focuses the development of a photo-to-speech application for the blind. Intelligent Eye, as the name suggests, is a technical remedy for the visually impaired so that they can navigate themselves with their own self without external assistance. Ideology behind this project is to strike an impact on the society so that visually backward beings can equalise their status. In this project, we combined both image and text processing to build a useful deep learning application.
15 |
16 |
17 | ---
18 |
19 | ## Requirements
20 |
21 | **Python**
22 | * Flask
23 | * Keras
24 | * NumPy
25 |
26 | **Flutter**
27 | * image_picker
28 | * dio
29 | * http
30 | * flutter_tts
31 |
32 | ---
33 |
34 | ## Workflow
35 |
36 |
37 |
38 |
39 | ---
40 |
41 |
42 | ## Demo
43 |
44 |
45 |
46 |
47 | ---
48 |
49 |
50 | ## References
51 |
52 | https://github.com/SHARONZACHARIA/Deploy-ML-model
--------------------------------------------------------------------------------
/backend/features.py:
--------------------------------------------------------------------------------
1 | from os import listdir
2 | from pickle import dump
3 | from keras.applications.vgg16 import VGG16
4 | from keras.preprocessing.image import load_img
5 | from keras.preprocessing.image import img_to_array
6 | from keras.applications.vgg16 import preprocess_input
7 | from keras.models import Model
8 |
9 | def extract_features(directory):
10 | model=VGG16()
11 | model.layers.pop()
12 | model=Model(inputs=model.inputs,outputs=model.layers[-1].output)
13 | print(model.summary())
14 | features = {}
15 | for name in listdir(directory):
16 | filename=directory + '/' + name
17 | #print(filename)
18 | image=load_img(filename, target_size=(224, 224))
19 | image=img_to_array(image)
20 | image = image.reshape((1, image.shape[0], image.shape[1], image.shape[2]))
21 | image = preprocess_input(image)
22 | feature = model.predict(image, verbose=0)
23 | image_id = name.split('.')[0]
24 | features[image_id] = feature
25 | print('>%s' % name)
26 | #print(name)
27 | return features
28 |
29 | directory = 'Flicker8k_Dataset'
30 | features = extract_features(directory)
31 | print('Extracted Features: %d' % len(features))
32 | dump(features, open('features.pkl', 'wb'))
--------------------------------------------------------------------------------
/backend/flask_backend.py:
--------------------------------------------------------------------------------
1 | import os
2 | from PIL import Image
3 | import io
4 | from flask import Flask,Blueprint,request,render_template,jsonify,Response,send_file
5 | import jsonpickle
6 | import numpy as np
7 | import json
8 | import base64
9 | import generate_caption as gc
10 |
11 | app = Flask(__name__)
12 | static_dir='images/'
13 |
14 | @app.route('/api', methods=['GET','POST'])
15 | def apiHome():
16 | r = request.method
17 | if(r=="GET"):
18 | with open("text/data.json") as f:
19 | data=json.load(f)
20 | return data
21 | elif(r=='POST'):
22 | with open(static_dir+'sample.jpg',"wb") as fh:
23 | fh.write(base64.decodebytes(request.data))
24 | captions=gc.generate_captions(static_dir+'sample.jpg')
25 | cap={"captions":captions}
26 | with open("text/data.json","w") as fjson:
27 | json.dump(cap,fjson)
28 | else:
29 | return jsonify({
30 | "captions":"Refresh again !"
31 | })
32 |
33 | @app.route('/result')
34 | def sendImage():
35 | return send_file(static_dir+'sample.jpg',mimetype='image/gif')
36 |
37 | if __name__ == '__main__':
38 | app.run(debug=True,host='192.168.43.232',port=5000)
--------------------------------------------------------------------------------
/backend/generate_caption.py:
--------------------------------------------------------------------------------
1 | from pickle import load
2 | from numpy import argmax
3 | import argparse
4 | import os
5 | from gtts.tts import gTTS
6 | from keras.preprocessing.sequence import pad_sequences
7 | from keras.applications.vgg16 import VGG16
8 | from keras.preprocessing.image import load_img
9 | from keras.preprocessing.image import img_to_array
10 | from keras.applications.vgg16 import preprocess_input
11 | from keras.models import Model
12 | from keras.models import load_model
13 |
14 | def extract_features(filename):
15 | model = VGG16()
16 | model.layers.pop()
17 | model = Model(inputs=model.inputs, outputs=model.layers[-1].output)
18 | image = load_img(filename, target_size=(224, 224))
19 | image = img_to_array(image)
20 | image = image.reshape((1, image.shape[0], image.shape[1], image.shape[2]))
21 | image = preprocess_input(image)
22 | feature = model.predict(image, verbose=0)
23 | return feature
24 |
25 | def word_for_id(integer, tokenizer):
26 | for word, index in tokenizer.word_index.items():
27 | if index == integer:
28 | return word
29 | return None
30 |
31 |
32 | def generate_desc(model, tokenizer, photo, max_length):
33 | in_text = 'startseq'
34 | for i in range(max_length):
35 | sequence = tokenizer.texts_to_sequences([in_text])[0]
36 | sequence = pad_sequences([sequence], maxlen=max_length)
37 | yhat = model.predict([photo,sequence], verbose=0)
38 | yhat = argmax(yhat)
39 | word = word_for_id(yhat, tokenizer)
40 | if word is None:
41 | break
42 | in_text += ' ' + word
43 | if word == 'endseq':
44 | break
45 | return in_text
46 |
47 | def generate_captions(photo_path):
48 | tokenizer = load(open('tokenizer.pkl', 'rb'))
49 | max_length = 34
50 | model = load_model('model.h5')
51 | photo = extract_features(photo_path)
52 | description = generate_desc(model, tokenizer, photo, max_length)
53 | description = description[9:-6]
54 | return description
55 |
--------------------------------------------------------------------------------
/backend/text.py:
--------------------------------------------------------------------------------
1 | import string
2 |
3 | def load_doc(filename):
4 | file = open(filename, 'r')
5 | text = file.read()
6 | file.close()
7 | return text
8 |
9 | def load_descriptions(doc):
10 | mapping = dict()
11 | for line in doc.split('\n'):
12 | tokens = line.split()
13 | if len(line) < 2:
14 | continue
15 | image_id, image_desc = tokens[0], tokens[1:]
16 | image_id = image_id.split('.')[0]
17 | image_desc = ' '.join(image_desc)
18 | if image_id not in mapping:
19 | mapping[image_id] = list()
20 | mapping[image_id].append(image_desc)
21 | return mapping
22 |
23 | def clean_descriptions(descriptions):
24 | table = str.maketrans('', '', string.punctuation)
25 | for key, desc_list in descriptions.items():
26 | for i in range(len(desc_list)):
27 | desc = desc_list[i]
28 | desc = desc.split()
29 | desc = [word.lower() for word in desc]
30 | desc = [w.translate(table) for w in desc]
31 | desc = [word for word in desc if len(word)>1]
32 | desc = [word for word in desc if word.isalpha()]
33 | desc_list[i] = ' '.join(desc)
34 |
35 |
36 | def to_vocabulary(descriptions):
37 | all_desc = set()
38 | for key in descriptions.keys():
39 | [all_desc.update(d.split()) for d in descriptions[key]]
40 | return all_desc
41 |
42 | def save_descriptions(descriptions, filename):
43 | lines = list()
44 | for key, desc_list in descriptions.items():
45 | for desc in desc_list:
46 | lines.append(key + ' ' + desc)
47 | data = '\n'.join(lines)
48 | file = open(filename, 'w')
49 | file.write(data)
50 | file.close()
51 |
52 | filename = 'Flickr8k.token.txt'
53 | doc = load_doc(filename)
54 | descriptions = load_descriptions(doc)
55 | print(len(descriptions))
56 | #print(descriptions)
57 | clean_descriptions(descriptions)
58 | vocabulary = to_vocabulary(descriptions)
59 | print(len(vocabulary))
60 | #print(vocabulary)
61 |
62 | save_descriptions(descriptions, 'descriptions.txt')
--------------------------------------------------------------------------------
/backend/train.py:
--------------------------------------------------------------------------------
1 | from numpy import array
2 | from pickle import load
3 | from keras.preprocessing.text import Tokenizer
4 | from keras.preprocessing.sequence import pad_sequences
5 | from keras.utils import to_categorical
6 | from keras.utils import plot_model
7 | from keras.models import Model
8 | from keras.layers import Input
9 | from keras.layers import Dense
10 | from keras.layers import LSTM
11 | from keras.layers import Embedding
12 | from keras.layers import Dropout
13 | from keras.layers.merge import add
14 | from keras.callbacks import ModelCheckpoint
15 |
16 |
17 | def load_doc(filename):
18 | file = open(filename, 'r')
19 | text = file.read()
20 | file.close()
21 | return text
22 |
23 | def load_set(filename):
24 | doc = load_doc(filename)
25 | dataset = list()
26 | for line in doc.split('\n'):
27 | if len(line) < 1:
28 | continue
29 | identifier = line.split('.')[0]
30 | dataset.append(identifier)
31 | return set(dataset)
32 |
33 | def load_clean_descriptions(filename, dataset):
34 | doc = load_doc(filename)
35 | descriptions = dict()
36 | for line in doc.split('\n'):
37 | tokens = line.split()
38 | image_id, image_desc = tokens[0], tokens[1:]
39 | if image_id in dataset:
40 | if image_id not in descriptions:
41 | descriptions[image_id] = list()
42 | desc = 'startseq ' + ' '.join(image_desc) + ' endseq'
43 | descriptions[image_id].append(desc)
44 | return descriptions
45 |
46 | def load_photo_features(filename, dataset):
47 | all_features = load(open(filename, 'rb'))
48 | features = {k: all_features[k] for k in dataset}
49 | return features
50 |
51 |
52 |
53 | def to_lines(descriptions):
54 | all_desc = list()
55 | for key in descriptions.keys():
56 | [all_desc.append(d) for d in descriptions[key]]
57 | return all_desc
58 |
59 | def create_tokenizer(descriptions):
60 | lines = to_lines(descriptions)
61 | tokenizer = Tokenizer()
62 | tokenizer.fit_on_texts(lines)
63 | return tokenizer
64 |
65 |
66 | def create_sequences(tokenizer, max_length, desc_list, photo):
67 | X1, X2, y = list(), list(), list()
68 | for desc in desc_list:
69 | seq = tokenizer.texts_to_sequences([desc])[0]
70 | for i in range(1, len(seq)):
71 | in_seq, out_seq = seq[:i], seq[i]
72 | in_seq = pad_sequences([in_seq], maxlen=max_length)[0]
73 | out_seq = to_categorical([out_seq], num_classes=vocab_size)[0]
74 | X1.append(photo)
75 | X2.append(in_seq)
76 | y.append(out_seq)
77 | return array(X1), array(X2), array(y)
78 |
79 | def max_length(descriptions):
80 | lines = to_lines(descriptions)
81 | return max(len(d.split()) for d in lines)
82 |
83 | def define_model(vocab_size,max_length):
84 | inputs1=Input(shape=(4096,))
85 | fe1=Dropout(0.5)(inputs1)
86 | fe2=Dense(256,activation='relu')(fe1)
87 |
88 | inputs2=Input(shape=(max_length,))
89 | se1=Embedding(vocab_size,256,mask_zero=True)(inputs2)
90 | se2=Dropout(0.5)(se1)
91 | se3=LSTM(256)(se2)
92 |
93 | decoder1=add([fe2,se3])
94 | decoder2=Dense(256,activation='relu')(decoder1)
95 | outputs=Dense(vocab_size,activation='softmax')(decoder2)
96 |
97 | model=Model(inputs=[inputs1,inputs2],outputs=outputs)
98 | model.compile(loss='categorical_crossentropy',optimizer='adam')
99 |
100 | print(model.summary())
101 | #plot_model(model,to_file='model.png',show_shapes=True)
102 | return model
103 |
104 | ###################################
105 | def data_generator(descriptions, photos, tokenizer, max_length):
106 | while 1:
107 | for key, desc_list in descriptions.items():
108 | photo = photos[key][0]
109 | in_img, in_seq, out_word = create_sequences(tokenizer, max_length, desc_list, photo)
110 | yield [[in_img, in_seq], out_word]
111 |
112 | ##################################
113 |
114 | filename = 'Flickr_8k.trainImages.txt'
115 | train = load_set(filename)
116 | print("train len pics: ",len(train))
117 | train_descriptions = load_clean_descriptions('descriptions.txt', train)
118 | print("desc len: ",len(train_descriptions))
119 | train_features = load_photo_features('features.pkl', train)
120 | print("length of pic features: ",len(train_features))
121 | tokenizer = create_tokenizer(train_descriptions)
122 | vocab_size = len(tokenizer.word_index) + 1
123 | print("vocab size: ", vocab_size)
124 | max_length = max_length(train_descriptions)
125 | print("maxlen: ",max_length)
126 | #print("yyyyy")
127 |
128 | model = define_model(vocab_size, max_length)
129 | epochs = 500
130 | steps = len(train_descriptions)/32
131 | for i in range(epochs):
132 | generator = data_generator(train_descriptions, train_features, tokenizer, max_length)
133 | model.fit_generator(generator, epochs=1, steps_per_epoch=steps, verbose=1)
134 | model.save('model_' + str(i) + '.h5')
135 |
136 |
--------------------------------------------------------------------------------
/backend/vgg16.py:
--------------------------------------------------------------------------------
1 | """VGG16 model for Keras.
2 |
3 | # Reference
4 |
5 | - [Very Deep Convolutional Networks for Large-Scale Image Recognition](
6 | https://arxiv.org/abs/1409.1556) (ICLR 2015)
7 |
8 | """
9 | from __future__ import absolute_import
10 | from __future__ import division
11 | from __future__ import print_function
12 |
13 | import os
14 |
15 | from . import get_submodules_from_kwargs
16 | from . import imagenet_utils
17 | from .imagenet_utils import decode_predictions
18 | from .imagenet_utils import _obtain_input_shape
19 |
20 | preprocess_input = imagenet_utils.preprocess_input
21 |
22 | WEIGHTS_PATH = ('https://github.com/fchollet/deep-learning-models/'
23 | 'releases/download/v0.1/'
24 | 'vgg16_weights_tf_dim_ordering_tf_kernels.h5')
25 | WEIGHTS_PATH_NO_TOP = ('https://github.com/fchollet/deep-learning-models/'
26 | 'releases/download/v0.1/'
27 | 'vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5')
28 |
29 |
30 | def VGG16(include_top=True,
31 | weights='imagenet',
32 | input_tensor=None,
33 | input_shape=None,
34 | pooling=None,
35 | classes=1000,
36 | **kwargs):
37 | """Instantiates the VGG16 architecture.
38 |
39 | Optionally loads weights pre-trained on ImageNet.
40 | Note that the data format convention used by the model is
41 | the one specified in your Keras config at `~/.keras/keras.json`.
42 |
43 | # Arguments
44 | include_top: whether to include the 3 fully-connected
45 | layers at the top of the network.
46 | weights: one of `None` (random initialization),
47 | 'imagenet' (pre-training on ImageNet),
48 | or the path to the weights file to be loaded.
49 | input_tensor: optional Keras tensor
50 | (i.e. output of `layers.Input()`)
51 | to use as image input for the model.
52 | input_shape: optional shape tuple, only to be specified
53 | if `include_top` is False (otherwise the input shape
54 | has to be `(224, 224, 3)`
55 | (with `channels_last` data format)
56 | or `(3, 224, 224)` (with `channels_first` data format).
57 | It should have exactly 3 input channels,
58 | and width and height should be no smaller than 32.
59 | E.g. `(200, 200, 3)` would be one valid value.
60 | pooling: Optional pooling mode for feature extraction
61 | when `include_top` is `False`.
62 | - `None` means that the output of the model will be
63 | the 4D tensor output of the
64 | last convolutional block.
65 | - `avg` means that global average pooling
66 | will be applied to the output of the
67 | last convolutional block, and thus
68 | the output of the model will be a 2D tensor.
69 | - `max` means that global max pooling will
70 | be applied.
71 | classes: optional number of classes to classify images
72 | into, only to be specified if `include_top` is True, and
73 | if no `weights` argument is specified.
74 |
75 | # Returns
76 | A Keras model instance.
77 |
78 | # Raises
79 | ValueError: in case of invalid argument for `weights`,
80 | or invalid input shape.
81 | """
82 | backend, layers, models, keras_utils = get_submodules_from_kwargs(kwargs)
83 |
84 | if not (weights in {'imagenet', None} or os.path.exists(weights)):
85 | raise ValueError('The `weights` argument should be either '
86 | '`None` (random initialization), `imagenet` '
87 | '(pre-training on ImageNet), '
88 | 'or the path to the weights file to be loaded.')
89 |
90 | if weights == 'imagenet' and include_top and classes != 1000:
91 | raise ValueError('If using `weights` as `"imagenet"` with `include_top`'
92 | ' as true, `classes` should be 1000')
93 | # Determine proper input shape
94 | input_shape = _obtain_input_shape(input_shape,
95 | default_size=224,
96 | min_size=32,
97 | data_format=backend.image_data_format(),
98 | require_flatten=include_top,
99 | weights=weights)
100 |
101 | if input_tensor is None:
102 | img_input = layers.Input(shape=input_shape)
103 | else:
104 | if not backend.is_keras_tensor(input_tensor):
105 | img_input = layers.Input(tensor=input_tensor, shape=input_shape)
106 | else:
107 | img_input = input_tensor
108 | # Block 1
109 | x = layers.Conv2D(64, (3, 3),
110 | activation='relu',
111 | padding='same',
112 | name='block1_conv1')(img_input)
113 | x = layers.Conv2D(64, (3, 3),
114 | activation='relu',
115 | padding='same',
116 | name='block1_conv2')(x)
117 | x = layers.MaxPooling2D((2, 2), strides=(2, 2), name='block1_pool')(x)
118 |
119 | # Block 2
120 | x = layers.Conv2D(128, (3, 3),
121 | activation='relu',
122 | padding='same',
123 | name='block2_conv1')(x)
124 | x = layers.Conv2D(128, (3, 3),
125 | activation='relu',
126 | padding='same',
127 | name='block2_conv2')(x)
128 | x = layers.MaxPooling2D((2, 2), strides=(2, 2), name='block2_pool')(x)
129 |
130 | # Block 3
131 | x = layers.Conv2D(256, (3, 3),
132 | activation='relu',
133 | padding='same',
134 | name='block3_conv1')(x)
135 | x = layers.Conv2D(256, (3, 3),
136 | activation='relu',
137 | padding='same',
138 | name='block3_conv2')(x)
139 | x = layers.Conv2D(256, (3, 3),
140 | activation='relu',
141 | padding='same',
142 | name='block3_conv3')(x)
143 | x = layers.MaxPooling2D((2, 2), strides=(2, 2), name='block3_pool')(x)
144 |
145 | # Block 4
146 | x = layers.Conv2D(512, (3, 3),
147 | activation='relu',
148 | padding='same',
149 | name='block4_conv1')(x)
150 | x = layers.Conv2D(512, (3, 3),
151 | activation='relu',
152 | padding='same',
153 | name='block4_conv2')(x)
154 | x = layers.Conv2D(512, (3, 3),
155 | activation='relu',
156 | padding='same',
157 | name='block4_conv3')(x)
158 | x = layers.MaxPooling2D((2, 2), strides=(2, 2), name='block4_pool')(x)
159 |
160 | # Block 5
161 | x = layers.Conv2D(512, (3, 3),
162 | activation='relu',
163 | padding='same',
164 | name='block5_conv1')(x)
165 | x = layers.Conv2D(512, (3, 3),
166 | activation='relu',
167 | padding='same',
168 | name='block5_conv2')(x)
169 | x = layers.Conv2D(512, (3, 3),
170 | activation='relu',
171 | padding='same',
172 | name='block5_conv3')(x)
173 | x = layers.MaxPooling2D((2, 2), strides=(2, 2), name='block5_pool')(x)
174 |
175 | if include_top:
176 | # Classification block
177 | x = layers.Flatten(name='flatten')(x)
178 | x = layers.Dense(4096, activation='relu', name='fc1')(x)
179 | x = layers.Dense(4096, activation='relu', name='fc2')(x)
180 | x = layers.Dense(classes, activation='softmax', name='predictions')(x)
181 | else:
182 | if pooling == 'avg':
183 | x = layers.GlobalAveragePooling2D()(x)
184 | elif pooling == 'max':
185 | x = layers.GlobalMaxPooling2D()(x)
186 |
187 | # Ensure that the model takes into account
188 | # any potential predecessors of `input_tensor`.
189 | if input_tensor is not None:
190 | inputs = keras_utils.get_source_inputs(input_tensor)
191 | else:
192 | inputs = img_input
193 | # Create model.
194 | model = models.Model(inputs, x, name='vgg16')
195 |
196 | # Load weights.
197 | if weights == 'imagenet':
198 | if include_top:
199 | weights_path = keras_utils.get_file(
200 | 'vgg16_weights_tf_dim_ordering_tf_kernels.h5',
201 | WEIGHTS_PATH,
202 | cache_subdir='models',
203 | file_hash='64373286793e3c8b2b4e3219cbf3544b')
204 | else:
205 | weights_path = keras_utils.get_file(
206 | 'vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5',
207 | WEIGHTS_PATH_NO_TOP,
208 | cache_subdir='models',
209 | file_hash='6d6bbae143d832006294945121d1f1fc')
210 | model.load_weights(weights_path)
211 | if backend.backend() == 'theano':
212 | keras_utils.convert_all_kernels_in_model(model)
213 | elif weights is not None:
214 | model.load_weights(weights)
215 |
216 | return model
217 |
--------------------------------------------------------------------------------
/captioner/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Exceptions to above rules.
37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
38 |
--------------------------------------------------------------------------------
/captioner/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 27321ebbad34b0a3fafe99fac037102196d655ff
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/captioner/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/captioner/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.captioner"
42 | minSdkVersion 21
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 | }
68 |
--------------------------------------------------------------------------------
/captioner/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/captioner/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/captioner/android/app/src/main/kotlin/com/example/captioner/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.captioner
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/captioner/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/captioner/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/captioner/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/captioner/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/captioner/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/captioner/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/captioner/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/captioner/fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/captioner/fonts/Raleway-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/fonts/Raleway-Regular.ttf
--------------------------------------------------------------------------------
/captioner/fonts/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/fonts/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/captioner/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/captioner/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/captioner/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/captioner/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/captioner/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.captioner;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.captioner;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.captioner;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------
/captioner/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/captioner/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/captioner/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/captioner/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/captioner/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | captioner
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/captioner/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/captioner/lib/api.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:dio/dio.dart';
3 | import 'package:http/http.dart' as http;
4 | import 'dart:convert';
5 |
6 | String uploadUrl = "http://192.168.43.232:5000/api";
7 | String downloadUrl = "http://192.168.43.232:5000/result";
8 |
9 | Future getData(String url) async {
10 | http.Response response = await http.get(url);
11 | return jsonDecode(response.body);
12 | }
13 |
14 | uploadImage(File imageFile,String url) async
15 | {
16 | String base64Image=base64Encode(imageFile.readAsBytesSync());
17 | Response response= await Dio().post(url,data:base64Image);
18 | print(response);
19 | }
--------------------------------------------------------------------------------
/captioner/lib/home.dart:
--------------------------------------------------------------------------------
1 | import 'result_page.dart';
2 | import 'package:flutter/material.dart';
3 | import 'dart:io';
4 | import 'package:image_picker/image_picker.dart';
5 | import 'api.dart';
6 | import 'package:toast/toast.dart';
7 |
8 | class Home extends StatefulWidget{
9 | @override
10 | State createState() => HomeState();
11 | }
12 |
13 | class HomeState extends State{
14 | File _image;
15 |
16 | Future getImage(bool isCamera) async{
17 | File image;
18 |
19 | if(isCamera){
20 | image= await ImagePicker.pickImage(source: ImageSource.camera);
21 | } else {
22 | image= await ImagePicker.pickImage(source: ImageSource.gallery);
23 | }
24 | uploadImage(image,uploadUrl);
25 | Toast.show("IMAGE UPLOADED !", context, duration: Toast.LENGTH_LONG,textColor: Colors.black,backgroundColor: Colors.white12,backgroundRadius: 15,gravity: Toast.BOTTOM);
26 |
27 | setState(() {
28 | _image=image;
29 | });
30 |
31 |
32 | }
33 |
34 | @override
35 | Widget build(BuildContext context) {
36 |
37 | return Container(
38 | decoration: BoxDecoration(
39 | gradient: LinearGradient(
40 | begin: Alignment.topRight,
41 | end: Alignment.bottomLeft,
42 | stops: [0.1, 0.5, 0.7, 0.9],
43 | colors: [
44 | Colors.yellow[800],
45 | Colors.yellow[700],
46 | Colors.yellow[600],
47 | Colors.yellow[400],
48 | ],
49 | ),
50 | ),
51 | child: Scaffold(
52 | backgroundColor: Colors.transparent,
53 | appBar: AppBar(
54 | backgroundColor: Colors.transparent,
55 | centerTitle: true,
56 | elevation: 0,
57 | title: Text('Captioner',style: TextStyle(fontSize:40,fontWeight: FontWeight.bold,color: Colors.black),),
58 | ),
59 | body: Center(
60 | child: Column(
61 | mainAxisAlignment: MainAxisAlignment.center,
62 | children: [
63 | IconButton(
64 | icon: Icon(Icons.insert_drive_file),
65 | color: Colors.white,
66 | iconSize: 70,
67 | onPressed: () {
68 | getImage(false);
69 | },
70 | ),
71 | SizedBox(height: 70.0,),
72 | IconButton(
73 | icon: Icon(Icons.camera_alt),
74 | color: Colors.white,
75 | iconSize: 70,
76 | onPressed: () {
77 | getImage(true);
78 | },
79 | ),
80 | SizedBox(height: 70.0,),
81 | ],
82 | ),
83 | ),
84 | floatingActionButton: FloatingActionButton.extended(
85 | onPressed: (){
86 | Navigator.push(
87 | context, MaterialPageRoute(builder: (context) => ResultPage(image:_image,) ));
88 | },
89 | icon: Icon(
90 | Icons.arrow_forward,color: Colors.black,size: 30,
91 | ),
92 | label: Text("Next",style: TextStyle(color: Colors.black,fontSize: 20),),
93 | backgroundColor: Colors.white,
94 | ),
95 | ),
96 |
97 |
98 | );
99 |
100 | }
101 |
102 | }
103 |
--------------------------------------------------------------------------------
/captioner/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'home.dart';
3 |
4 | void main() => runApp(MyApp());
5 |
6 | class MyApp extends StatelessWidget{
7 | @override
8 | Widget build(BuildContext context) {
9 | return MaterialApp(
10 | theme: ThemeData(
11 | fontFamily: 'Raleway',
12 | ),
13 | home: Home(),
14 | debugShowCheckedModeBanner: false,
15 | );
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/captioner/lib/result_page.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_tts/flutter_tts.dart';
4 | import 'api.dart';
5 |
6 | class ResultPage extends StatefulWidget{
7 | final File image;
8 | ResultPage({Key key, @required this.image}):super( key : key );
9 |
10 | @override
11 | State createState() => ResultPageState(image);
12 | }
13 |
14 | class ResultPageState extends State{
15 | String captions="Refresh once !";
16 | var data;
17 | File image;
18 | FlutterTts ftts=FlutterTts();
19 |
20 | ResultPageState(this.image);
21 |
22 | Widget build(BuildContext context) {
23 | return Container(
24 | decoration: BoxDecoration(
25 | gradient: LinearGradient(
26 | begin: Alignment.topRight,
27 | end: Alignment.bottomLeft,
28 | stops: [0.1, 0.5, 0.7, 0.9],
29 | colors: [
30 | Colors.yellow[800],
31 | Colors.yellow[700],
32 | Colors.yellow[600],
33 | Colors.yellow[400],
34 | ],
35 | ),
36 | ),
37 | child: Scaffold(
38 | backgroundColor: Colors.transparent,
39 | body: Center(
40 | child: Column(
41 | mainAxisAlignment: MainAxisAlignment.center,
42 | children: [
43 | Container(
44 | //color: Colors.white,
45 | //margin: EdgeInsets.all(5),
46 | padding: EdgeInsets.all(10),
47 | decoration: BoxDecoration(
48 | borderRadius: BorderRadius.circular(20),
49 | color: Colors.white,
50 | ),
51 | child: Text(
52 | "Captions",
53 | style: TextStyle(fontSize: 40,fontWeight: FontWeight.bold,color: Colors.black),
54 | ),
55 | ),
56 | SizedBox(height: 30,),
57 | Container(
58 | decoration: BoxDecoration(
59 | border: Border.all(color:Colors.white,width:3),
60 | ),
61 | child: displayImage(image),
62 | ),
63 | SizedBox(height: 20,),
64 | Container(
65 | height: 100,
66 | width: 200,
67 | padding: EdgeInsets.all(5),
68 | decoration: BoxDecoration(
69 | borderRadius:BorderRadius.circular(10),
70 | color: Colors.white,
71 | ),
72 | child: Text(
73 | captions,style: TextStyle(color: Colors.black),
74 | ),
75 | ),
76 | SizedBox(height: 20,),
77 | Row(
78 | mainAxisAlignment: MainAxisAlignment.center,
79 | children: [
80 | RaisedButton(
81 | child: Text("Refresh",style: TextStyle(color: Colors.black,),),
82 | elevation: 5.0,
83 | color: Colors.white,
84 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
85 | onPressed: () => getCaption(),
86 | ),
87 | SizedBox(width: 25,),
88 | RaisedButton(
89 | child: Text("Audio",style: TextStyle(color: Colors.black,),),
90 | elevation: 5.0,
91 | color: Colors.white,
92 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
93 | onPressed: () => speakCaption(),
94 | ),
95 | ],
96 | )
97 | ],
98 | ),
99 | ),
100 | /*
101 | floatingActionButton: FloatingActionButton.extended(
102 | onPressed: () => Navigator.pushNamed(context, "/"),
103 | icon: Icon(
104 | Icons.arrow_back,color: Colors.black,size: 30,
105 | ),
106 | label: Text("Back",style: TextStyle(color: Colors.black),),
107 | ),
108 | */
109 | ),
110 |
111 | );
112 | }
113 |
114 | Future getCaption() async{
115 | data=await getData(uploadUrl);
116 |
117 | setState(() {
118 | captions=data['captions'];
119 | });
120 | }
121 |
122 | speakCaption() async{
123 | await ftts.setLanguage("en-US");
124 | await ftts.setPitch(1);
125 | await ftts.speak(captions);
126 | }
127 |
128 | Widget displayImage(File file) {
129 | return new SizedBox(
130 | height: 250.0,
131 | width: 200.0,
132 | child: file == null ? Container() : Image.file(file),
133 | );
134 | }
135 | }
--------------------------------------------------------------------------------
/captioner/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.11"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.5.2"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.5"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.2"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.14.11"
46 | convert:
47 | dependency: transitive
48 | description:
49 | name: convert
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.1.1"
53 | crypto:
54 | dependency: transitive
55 | description:
56 | name: crypto
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.1.3"
60 | cupertino_icons:
61 | dependency: "direct main"
62 | description:
63 | name: cupertino_icons
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.1.3"
67 | dio:
68 | dependency: "direct main"
69 | description:
70 | name: dio
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "3.0.8"
74 | flutter:
75 | dependency: "direct main"
76 | description: flutter
77 | source: sdk
78 | version: "0.0.0"
79 | flutter_plugin_android_lifecycle:
80 | dependency: transitive
81 | description:
82 | name: flutter_plugin_android_lifecycle
83 | url: "https://pub.dartlang.org"
84 | source: hosted
85 | version: "1.0.4"
86 | flutter_test:
87 | dependency: "direct dev"
88 | description: flutter
89 | source: sdk
90 | version: "0.0.0"
91 | flutter_tts:
92 | dependency: "direct main"
93 | description:
94 | name: flutter_tts
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "0.8.6"
98 | flutter_web_plugins:
99 | dependency: transitive
100 | description: flutter
101 | source: sdk
102 | version: "0.0.0"
103 | http:
104 | dependency: "direct main"
105 | description:
106 | name: http
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "0.12.0+4"
110 | http_parser:
111 | dependency: transitive
112 | description:
113 | name: http_parser
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "3.1.3"
117 | image:
118 | dependency: transitive
119 | description:
120 | name: image
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "2.1.4"
124 | image_picker:
125 | dependency: "direct main"
126 | description:
127 | name: image_picker
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.6.3+1"
131 | matcher:
132 | dependency: transitive
133 | description:
134 | name: matcher
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.12.6"
138 | meta:
139 | dependency: transitive
140 | description:
141 | name: meta
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.8"
145 | path:
146 | dependency: transitive
147 | description:
148 | name: path
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.6.4"
152 | pedantic:
153 | dependency: transitive
154 | description:
155 | name: pedantic
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.8.0+1"
159 | petitparser:
160 | dependency: transitive
161 | description:
162 | name: petitparser
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.4.0"
166 | quiver:
167 | dependency: transitive
168 | description:
169 | name: quiver
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.0.5"
173 | sky_engine:
174 | dependency: transitive
175 | description: flutter
176 | source: sdk
177 | version: "0.0.99"
178 | source_span:
179 | dependency: transitive
180 | description:
181 | name: source_span
182 | url: "https://pub.dartlang.org"
183 | source: hosted
184 | version: "1.5.5"
185 | stack_trace:
186 | dependency: transitive
187 | description:
188 | name: stack_trace
189 | url: "https://pub.dartlang.org"
190 | source: hosted
191 | version: "1.9.3"
192 | stream_channel:
193 | dependency: transitive
194 | description:
195 | name: stream_channel
196 | url: "https://pub.dartlang.org"
197 | source: hosted
198 | version: "2.0.0"
199 | string_scanner:
200 | dependency: transitive
201 | description:
202 | name: string_scanner
203 | url: "https://pub.dartlang.org"
204 | source: hosted
205 | version: "1.0.5"
206 | term_glyph:
207 | dependency: transitive
208 | description:
209 | name: term_glyph
210 | url: "https://pub.dartlang.org"
211 | source: hosted
212 | version: "1.1.0"
213 | test_api:
214 | dependency: transitive
215 | description:
216 | name: test_api
217 | url: "https://pub.dartlang.org"
218 | source: hosted
219 | version: "0.2.11"
220 | toast:
221 | dependency: "direct main"
222 | description:
223 | name: toast
224 | url: "https://pub.dartlang.org"
225 | source: hosted
226 | version: "0.1.5"
227 | typed_data:
228 | dependency: transitive
229 | description:
230 | name: typed_data
231 | url: "https://pub.dartlang.org"
232 | source: hosted
233 | version: "1.1.6"
234 | vector_math:
235 | dependency: transitive
236 | description:
237 | name: vector_math
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "2.0.8"
241 | xml:
242 | dependency: transitive
243 | description:
244 | name: xml
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "3.5.0"
248 | sdks:
249 | dart: ">2.4.0 <3.0.0"
250 | flutter: ">=1.12.13+hotfix.5 <2.0.0"
251 |
--------------------------------------------------------------------------------
/captioner/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: captioner
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 | image_picker:
23 | dio:
24 | http:
25 | flutter_tts:
26 | toast:
27 |
28 | # The following adds the Cupertino Icons font to your application.
29 | # Use with the CupertinoIcons class for iOS style icons.
30 | cupertino_icons: ^0.1.2
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 |
36 |
37 | # For information on the generic Dart part of this file, see the
38 | # following page: https://dart.dev/tools/pub/pubspec
39 |
40 | # The following section is specific to Flutter.
41 | flutter:
42 |
43 | # The following line ensures that the Material Icons font is
44 | # included with your application, so that you can use the icons in
45 | # the material Icons class.
46 | uses-material-design: true
47 |
48 | # To add assets to your application, add an assets section, like this:
49 | # assets:
50 | # - images/a_dot_burr.jpeg
51 | # - images/a_dot_ham.jpeg
52 |
53 | # An image asset can refer to one or more resolution-specific "variants", see
54 | # https://flutter.dev/assets-and-images/#resolution-aware.
55 |
56 | # For details regarding adding assets from package dependencies, see
57 | # https://flutter.dev/assets-and-images/#from-packages
58 |
59 | # To add custom fonts to your application, add a fonts section here,
60 | # in this "flutter" section. Each entry in this list should have a
61 | # "family" key with the font family name, and a "fonts" key with a
62 | # list giving the asset and other descriptors for the font. For
63 | # example:
64 | fonts:
65 | - family: Montserrat
66 | fonts:
67 | - asset: fonts/Montserrat-Regular.ttf
68 | - family: OpenSans
69 | fonts:
70 | - asset: fonts/OpenSans-Regular.ttf
71 | - family: Raleway
72 | fonts:
73 | - asset: fonts/Raleway-Regular.ttf
74 | - family: Roboto
75 | fonts:
76 | - asset: fonts/Roboto-Regular.ttf
77 | #
78 | # For details regarding fonts from package dependencies,
79 | # see https://flutter.dev/custom-fonts/#from-packages
80 |
--------------------------------------------------------------------------------
/captioner/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:captioner/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/images/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/images/demo.gif
--------------------------------------------------------------------------------
/images/workflow.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeliosX7/image-captioning-app/8aeb520638a88f20753cc07f792e7180776c42e0/images/workflow.JPG
--------------------------------------------------------------------------------