diabolic6045 commited on
Commit
e6f5b35
·
1 Parent(s): 5da6cfc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -1
README.md CHANGED
@@ -1,3 +1,62 @@
1
  ---
2
  pipeline_tag: image-classification
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  pipeline_tag: image-classification
3
+ ---
4
+ ## Location Classification of Indian Cities
5
+
6
+ This Streamlit app is designed to detect the location of an Indian city in an uploaded image. It uses a deep learning model trained on 10,500 images classified into 5 classes of cities including Ahmedabad, Delhi, Kerala, Kolkata, and Mumbai. The model was trained in association with Parul University and currently has a test accuracy of 66.3%.
7
+
8
+ ## How to Use the App
9
+ 1. Clone the GitHub repository:
10
+ ```
11
+ git clone https://github.com/shahdivax/Location-Classification-of-Indian-Cities.git --branch master
12
+ ```
13
+ 2. Install the required libraries:
14
+ ```
15
+ pip install -r requirements.txt
16
+ ```
17
+ 3. Run the app:
18
+ ```
19
+ streamlit run app.py
20
+ ```
21
+ ![image](https://github.com/shahdivax/Location-Classification-of-Indian-Cities/blob/master/github_data/streamlitimg.png)
22
+ For Flask app:<br>
23
+ change Directory
24
+ ```
25
+ cd Flask
26
+ ```
27
+ run app:
28
+ ```
29
+ flask run
30
+ ```
31
+ #### Flask Demo:
32
+
33
+
34
+ https://github.com/shahdivax/Location-Classification-of-Indian-Cities/assets/61962983/d29652ab-2e07-4b81-bd6d-c4e53c5f3891
35
+
36
+
37
+ <br>
38
+ 4. Upload an image in JPG or JPEG format.<br>
39
+ 5. The app will display the uploaded image and predict the location of the city in the image.<br>
40
+ 6. The predicted location and accuracy percentage will be displayed.
41
+
42
+ Please note that the app may not work accurately for images that are not clear or do not have a distinct view of the city's landmarks.
43
+
44
+ ## Live Demo
45
+ A live demo of the app is available [here](https://location-classification-of-indian-cities.streamlit.app/) hosted with Streamlit.
46
+
47
+ ## Code
48
+ The code for this app was written in Python. It uses the following libraries:
49
+ * Streamlit: To build the app user interface
50
+ * TensorFlow and Keras: To load the pre-trained model and process images
51
+ * Numpy and Random: For data processing and random color selection
52
+
53
+ The application flow follows the steps below:
54
+ 1. Load the trained deep learning model.
55
+ 2. Define the class labels for the 5 Indian cities.
56
+ 3. Set a minimum accuracy threshold for predictions.
57
+ 4. Create a function to process uploaded images.
58
+ 5. Create a Streamlit app interface with a file uploader.
59
+ 6. Process uploaded images and display the predicted location and accuracy.
60
+
61
+ ## Future Work
62
+ This app can be improved by increasing the size of the training dataset and fine-tuning the pre-trained model to increase its accuracy. Additionally, the app can be trained to recognize city landmarks to improve its performance.