Skip to content

Commit

Permalink
Merge pull request #25 from BU-Spark/final
Browse files Browse the repository at this point in the history
Final submission
  • Loading branch information
funkyvoong authored Jan 10, 2024
2 parents 9733fe1 + 07bb44a commit f63cce5
Show file tree
Hide file tree
Showing 18,935 changed files with 95,610 additions and 55 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev/
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
51 changes: 0 additions & 51 deletions .github/workflows/add_collaborators.yml

This file was deleted.

14 changes: 14 additions & 0 deletions COLLABORATORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hemant Kumar Singh
- Email: iamhks14@gmail.com
- Github: [hemantsingh11](https://github.com/hemantsingh11)
- LinkedIn: [hemant-kumar-singh](https://www.linkedin.com/in/iamhemantsingh/)

Jaisal Singh
- Email: jaisal64@gmail.com
- Github: [jaisal64](https://github.com/jaisal64)
- LinkedIn: [jaisal-singh](https://www.linkedin.com/in/jaisal-singh/)

Vedika Srivastava
- Email: vedikas3012@gmail.com
- Github: [VedikaSrivastava](https://github.com/VedikaSrivastava)
- LinkedIn: [vedika-srivastava](https://www.linkedin.com/in/vedika-srivastava/)
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Use an official Python runtime as a base image
FROM registry.access.redhat.com/ubi9/python-311:latest

USER root
RUN yum -y update && yum -y install libglvnd-glx

# Set the working directory in the container
WORKDIR /app

# Copy the contents of the local directory to the working directory
COPY . .


RUN pip install --upgrade pip

RUN pip install jupyter

# # Change working directory to /root temporarily to generate Jupyter config
# WORKDIR /root

# # Configure Jupyter Notebook to run without a password or token
# RUN jupyter notebook --generate-config --allow-root \
# && echo "c.NotebookApp.token = ''" >> /root/.jupyter/jupyter_notebook_config.py \
# && echo "c.NotebookApp.password = ''" >> /root/.jupyter/jupyter_notebook_config.py


# Install dependencies specified in requirements.txt
RUN pip install -r requirements.txt



# Command to run the Jupyter notebook
CMD ["jupyter", "notebook", "--ip='*'", "--port=8080", "--no-browser", "--allow-root"] #port where the container will listen to
66 changes: 62 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,64 @@
# TEMPLATE-base-repo
# Project Description

# Add Users
To add yourself to the repository, open a Pull Request modifying `COLLABORATORS`, entering your GitHub username in a newline.
The Windows on Earth program receives astronaut photos from the International Space Station (ISS). We know the location of the ISS when the photo was taken, but not what the photo is of. This project seeks to use image recognition/machine learning to attempt to geolocate the images automatically. We have a website at [Windows on Earth](https://www.windowsonearth.org/). Our goal is to accurately "predict" the location of the image.

All Pull Requests must follow the Pull Request Template, with a title formatted like such `[Project Name]: <Descriptive Title>`
# Instructions to run the Final Pipelines

## Build and run a docker container (only for Pipeline-1 and Pipeline-2)
- use the following command to build `docker build -t windows-on-earth .` the docker container. we need to build the code only once.
- run the docker container using the following command `docker run -p 8080:8080 windows-on-earth`.
```
Note: How to run container without building
- pull the image from dockerhub using the command `docker pull vedikasrivastavr/terc-windows-on-earth`
- now run the container `docker run -p 8080:8080 vedikasrivastavr/terc-windows-on-earth`
```
- open the link to the browser once the container is running or paste `http://localhost:8080/tree` in the browser.
- if you had previously created the container do `docker start <replace by container id>` and open `http://localhost:8080/tree`.


## How to run [Pipeline-1-(NN)](./pipeline-1-(NN)/)
### For single images
- upload you query image in the [query_images](./query_images/) folder.
- run the notebook [Poc_pipeline_NN_singleimage.ipynb](./pipeline-1-(NN)/Poc_pipeline_NN_singleimage.ipynb).
- enter the query image file name when prompted.
- enter the mapbox access token when prompted.

### For multiple images
- upload your images as a folder in [query_images](./query_images/) folder.
- run the notebook [Poc_pipeline_NN_multipleimages.ipynb](./pipeline-1-(NN)/Poc_pipeline_NN_multipleimages.ipynb).
- enter the name of the folder containing your images when prompted.
- enter the mapbox access token when prompted.
- find the predicted location in [NN_multipleimages_results.csv](./pipeline-1-(NN)/NN_multipleimages_results.csv).

## How to run [Pipeline-2-(SIFT)](./pipeline-2-(SIFT)/)
- upload you query images in the [query_images](./query_images/) folder.
- add the name of the query images in `Image` column of [results_SIFT_v2_csv.csv](./pipeline-2-(SIFT)/results_SIFT_v2_csv.csv).
- run the notebook [sliding_window_matcher_final_v3.ipynb](./pipeline-2-(SIFT)/sliding_window_matcher_final_v3.ipynb).
- enter the Google Maps API token when prompted.
- view the identified location in [results_SIFT_v2_csv.csv](./pipeline-2-(SIFT)/results_SIFT_v2_csv.csv) in appropriate columns for each image.


## How to run [Pipeline-3-(TerraByte)](https://chat.openai.com/g/g-cGxe4cVEb-terrabyte)
```
NOTE: requires GPT4 subscription for use.
```
- [Click here](https://chat.openai.com/g/g-cGxe4cVEb-terrabyte) to open our custom version of ChatGPT to access pipeline 3.
- Upload an image of Earth taken from the ISS for analysis.
- If available, include the approximate GPS coordinates of the ISS at the time the image was taken. This helps in narrowing down potential locations.
- Ask TerraByte to geolocate the image. You can include specific questions or details you're interested in, such as identifying particular geographical features or confirming a suspected location.
- TerraByte will extract and identify natural and man-made features visible in the image. It will then try to determine the region of Earth depicted in the image based on the analysis. If the exact location is uncertain, TerraByte will offer a list of likely locations.
- Feel free to ask follow-up questions or request more details about any part of TerraByte's analysis.

Tips for Best Results
- Image Quality: High-resolution images with distinct geographical markers yield better results.
- ISS Coordinates: Providing accurate ISS coordinates at the time of the image capture significantly enhances location prediction accuracy. However, if the location of the ISS is quite far from the location in the image, it might cause inaccurate identification.


# Find a detailed account of the research, experimentation and evaluations at [dev/README.md](./dev/README.md)


# [Project Members](./COLLABORATORS)

- [Hemant Kumar Singh](https://github.com/hemantsingh11)
- [Jaisal Singh](https://github.com/jaisal64)
- [Vedika Srivastava](https://github.com/VedikaSrivastava)
3 changes: 3 additions & 0 deletions data/aoi_images/iss040e092721_aoi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions data/aoi_images/iss065e013079_aoi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions data/aoi_images/iss065e067142_aoi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions data/aoi_images/iss065e069380_aoi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f63cce5

Please sign in to comment.