-
Notifications
You must be signed in to change notification settings - Fork 16
Webapp #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Congrats.
I think that the symbolic link part with the different image folders could be in a specific configuration file, read by the Flask app when it starts.
It's not very clear to me the name of the different routes: demo_predictor
, predictor
, predictor_demo
. You don't know if it's a route which serves a HTML file, or a route which serves some JSON data. And I think you should add some docstring.
deeposlandia/static/app.js
Outdated
}; | ||
|
||
// get the date before today in YYYY-MM-DD string format | ||
function getYesterday() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function mandatory? Maybe you don't neet it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. Actually the whole app.js
is useless for deeposlandia
. I remove it.
deeposlandia/static/app.js
Outdated
|
||
// Build the URL with a BASE_URL/<city> suffix based from a DOM element with the | ||
// "city" dataset attribute, i.e. 'data-city'. | ||
function cityurl(dom_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legacy copy/pasting from jitenshea I think. You can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're write, I remove the file from the project. :)
deeposlandia/webapp.py
Outdated
|
||
app = Flask(__name__) | ||
app.config['ERROR_404_HELP'] = False | ||
app.config['SWAGGER_UI_DOC_EXPANSION'] = 'list' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't use Swagger, you can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
deeposlandia/webapp.py
Outdated
# if user does not select file, browser also | ||
# submit a empty part without filename | ||
if file.filename == '': | ||
print('No selected file') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remaining print
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is a stackoverflow-oriented development issue, there... Maybe we can keep the log as the function behavior still have to be clarified. I replace print
statements with utils.logger.info
.
I agree regarding the symbolic link point. I will add a dedicated issue to keep it in our mind. |
… be used by the web application Before this commit inference.py was only a standalone module, with a main method usable in a terminal. From now, the corresponding treatments have been encapsulated in a dedicated function. We can still call inference.py to make label predictions; additionnally, it can be used into the web application.
…for Mapillary dataset
…rediction with Mapillary dataset
… (feature detection)
…hread before infering labels
…to demo This commit extends the web app modification to javascript code, to make the demo page show the ground truth image. At this point, we must add that symbolic links are fundamental to succeed in displaying the demo results. There is a `shapes` link that directs to the demo shapes dataset, either do the `mapillary` symbolic link. Both datasets are structured with two subdirectories (`images` and `labels`) where images are picked.
…ll as predictions with accurate label colors
This PR introduces a brand new way for visualizing deep learning predictions through a Flask web application.
The application is quite simple, as no real focus has been done on formatting web pages. However, it provides a first complete picture of the project results.
In order to make the Flask app happen, some symbolic link must be designed:
deeposlandia/static/shapes
that points on shape image folder (the folder that contains aimages
and alabels
subrepositories), for demo purpose.deeposlandia/static/mapillary
that points on mapillary image folder for demo purpose (see previous point).deeposlandia/static/predicted_images
that points to a server-side temporary folder to store predicted images (labelled versions of tested images).deeposlandia/static/sample_image
that points toimages
repository within thedeeposlandia
project, so as to display example images at web page first visits.This PR fixes issue #55 .