Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunch of fixes and new features #250

Merged
merged 68 commits into from
Jan 24, 2022
Merged

Bunch of fixes and new features #250

merged 68 commits into from
Jan 24, 2022

Conversation

ansonnn07
Copy link
Collaborator

@ansonnn07 ansonnn07 commented Jan 24, 2022

Essentially a lot of bug fixes and then updates to the main app.py script, and also deployment_page.py. For more details, refer to the commit messages as they explained everything in detail.

ansonnn07 and others added 30 commits November 25, 2021 03:14
instead of project_page.py
- Add connection between login page and project page
- Improve the user creation functions to use better DB queries
- Add connection between different user pages
- Change theme to only use 'Light' theme because the `data_table` would
have weird colors if using any other theme
- Commented out every line of `st.set_page_config()`
- TBC on user_management_page and user_info page
Dashboard, CreateNewUser, and EditUser
- Use create_new_user page to directly work with EditUser by checking
whether session_state.current_user exists
page with User Session Log table
- New: Add "Switch User" navigation in deployment section to allow
switching to other user even during deployment
- Also fix the `session_state.deployment_conf` to use `on_change`
or `on_click` callbacks to update the `deploy_conf` on any widget change
- Fix `update_logout_session_log()`
either classification or segmentation, if labelmap file is provided
- Add labelmap generation during training
- Change uploaded type for keras models to only accept archive,
similar to TFOD
- Add checking for output layer nodes to be same with number of classes
in uploaded labelmap file or the generated labelmap
- Various fixes to deployment page to save frames properly
- Fix exporting for evaluation if the exported files were deleted
after training
- Change models_page to directly to go training_config page
if attached_model is changed, to avoid issues with segmentation
model parameters
- Also reset session_state.trainer if user decided to go back to
change any existing info after entering training page
- Fix augmentation page to work for uploaded image
- Improved training_config to use `param_dict.get()` to get
training_param
- Change Training.training_path from property to `get_paths()` method
- Use `keras-model.h5` as model filename to avoid issues when
user decided to change model name
- Send the user to database_setup page if no secrets.toml file or
if database connection failed
- Allow user info update without password update
- Reset all session_states and logout if user decides to delete himself
- Change the user role of first user created must be Administrator
- Add all latest package requirements to 'requirements_no_hash.txt'
- Also fix the TFOD installation
- Use existing database of name 'integrated_vision_inspection_system'
if already exists
- Show clearer instructions to the users in the database_setup form
- Use pycocotools-windows for Windows installation
- Fix most st.cache decorated functions by using
allow_output_mutation=True, not sure why there was no such error
previously with st.cache
- Use APP_DATABASE_NAME to get from env variable or default to
"integrated_vision_inspection_system"
to create this db name for our app
- Fix visualization of segment_inference_pipeline for deployment
- Improve helper.get_directory_name() to remove unwanted symbols,
also change Project.query_annotations to create image_paths the same way
- Fix editor_management's TAGNAMES to use PolygonLabels for Semantic

- Test and fix uploading and training of segmentation models
- Add more instructions in deployment_page
- Add more instructions in deployment_page
- Feat: add publish_frame config to publish output_frame through MQTT
to work for all pretrained_models
- Add different preprocess_input function for
pretrained classification models
- Fix custom_train_test_split() to work properly for
stratify with val + test set
- Change xml_to_df() to only use cache in augmentation_config page
- Fix PostgreSQL port to always use 5432 in docker-compose
- Add docker-compose.cpu.yml file for without GPU support
- Change '.env' file as optional for docker-compose
- Set user to be 'postgres' as it is the default superuser
- Set the maximum length of a name to be 21 (in check_if_field_empty())
- Fix `find_tfod_metric()` to take the entire `Loss/...' metric name
- To handle paths with space characters, in functions
- Removed session_state.archive_success
- Replace st.experimental_memo with st.cache to be able to
clear their cache
in deployment page
- Fix updating existing user info without any password input
- Add selectbox in User Management Page to easily change user role
- Rearrange MQTT options to appear before clicking "Deploy Model"
- Add timezone to get_result_fn in deployment
- Fix the run_command() to correctly spaced in trainer
- Use MQTT to send the current view from dobot script to the
deployment_page to be able to check the labels
- Add labels for different views for P2/143 machine part
- TO TEST for P2/143 training and running
- Store NG images in a specific 'NG-images' directory
ansonnn07 and others added 26 commits December 27, 2021 14:04
Updated Dobot API
- Add/Remove a few attributes in DeploymentConfig:
use_multi_cam, num_cameras, camera_titles, camera_types,
camera_sources, camera_keys
- camera_sources attribute is used to combine both USB camera ports and
IP camera addresses, make things easier
- Change MQTTTopics.publish_frame to be List[str] to publish frame to
different topics for different cameras
- Video recording is also saved into separate files for each camera
- Label checking at different views is also possible by comparing
received 'view' message with the 'camera_titles' entered by the user
- get labels from classes in main.py
- Use frontslash '/' in the camera title to separate multiple views
for a single camera
- Add a spinner message for the "Move Dobot" button in deployment
- Use os.kill(pid, signal) to kill the subprocess' pid
- By changing checkpoint_every_n to save ckpt at every 100 steps
instead of 1000 to be able to continue from any trained steps of
multiple of 100
Also fix deployment page issue with updating number of cameras too fast
- Fix Docker permission issues when saving to existing CSV files during
database creation
- Fix for both Dockerfile and Dockerfile.cpu
- Change Docker postgres local port to 6543
- Fix restarting model sequence properly for pretrained models in
scrape_setup_model_details()
- Updated streamlit 1.3.0 -> 1.3.1
- by adding the "myuser" to "video" usergroup
- Change list_available_cameras() to check for at least 5 ports
- to avoid permission issues if downloading to cwd in Docker
- Fix the captured_images path in new_dataset.py if
using Docker container
- Change create_tf_dataset() to use small shuffle buffer size without
cache to avoid slow and memory issues
- Change new_dataset page to use the proper "cam_key" for IP Camera to
reset properly
- Fix: create all required directories in path_desc.py to avoid issues
- By reset_multi_camera_config() at the right places, and also
update_camera_sources_from_types() when needed
- Fix error checking to check that number of USB cameras specified
is not more than the number of working ports
- Add a "Reset all cameras" button to use in case any error occurs
- For CSV, only save if the CSV file is not exists, or if the new
scraped data is not the same as existing CSV data
- Same thing for database models table pretrained model rows
- by allowing user to configure how many ports to check exactly
- Refactor create_csv_file_and_writer() to check whether the
CSV file exists within the function
- Update config.toml to let new Streamlit work properly
- remove add_report_ctx() as it is not available and not needed anymore
for image classification deployment type
@ansonnn07 ansonnn07 self-assigned this Jan 24, 2022
This was linked to issues Jan 24, 2022
@ansonnn07 ansonnn07 merged commit 45f5762 into main Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REMOVE SIDEBAR AFTER INTEGRATING INTO APP.PY incorrect SECRETS_DIR
2 participants