Coder Social home page Coder Social logo

msf4-0 / integrated-vision-inspection-system-ivis Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 4.0 30.7 MB

# AI Forward - Integrated Vision Inspection System (IVIS)

License: GNU General Public License v3.0

Dockerfile 0.20% Shell 0.02% Python 63.04% HTML 0.87% TypeScript 2.52% CSS 0.12% JavaScript 0.17% Jupyter Notebook 30.54% PLpgSQL 2.52%

integrated-vision-inspection-system-ivis's People

Contributors

ansonnn07 avatar ch4mploo avatar dependabot[bot] avatar msfshrdc avatar nic167 avatar rchuzh99 avatar shihau avatar yapjunkang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

integrated-vision-inspection-system-ivis's Issues

numpy error: Expected 96 from C header, got 88 from PyObject

Describe the bug
Got the following error when attempting to run the app right after installation on two different windows pcs numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Error Messages

2022-04-14 09:28:33.645030: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-04-14 09:28:34.073339: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1334 MB memory:  -> device: 0, name: NVIDIA GeForce MX250, pci bus id: 0000:01:00.0, compute capability: 6.1
[INFO] 14-Apr-22 09:28:34 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 14-Apr-22 09:28:34 - [app.setup: 90] st.secrets = {'postgres': {'host': 'localhost', 'port': '5432', 'dbname': 'integrated_vision_inspection_system', 'user': 'postgres', 'password': 'neXpostgres'}}
[INFO] 14-Apr-22 09:28:34 - [database_setup.test_database_connection: 103] Successfully connected to Database integrated_vision_inspection_system
[INFO] 14-Apr-22 09:28:35 - [database_manager.init_connection: 141] Connecting to the PostgreSQL database...
[DEBUG] 14-Apr-22 09:28:35 - [database_manager.init_connection: 144] Connection kwargs: {'host': 'localhost', 'port': '5432', 'dbname': 'integrated_vision_inspection_system', 'user': 'postgres', 'password': 'neXpostgres'}
[INFO] 14-Apr-22 09:28:35 - [database_manager.init_connection: 165] PostgreSQL database version: PostgreSQL 14.2, compiled by Visual C++ build 1914, 64-bit
[INFO] 14-Apr-22 09:28:35 - [database_manager.init_connection: 166] PostgreSQL connection status: 0
[INFO] 14-Apr-22 09:28:35 - [database_manager.init_connection: 168] You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
2022-04-14 09:28:35.971 WARNING streamlit.error_util: Traceback (most recent call last):
  File "C:\Users\user\anaconda3\envs\ivis\lib\site-packages\streamlit\script_runner.py", line 379, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\user\Code\ivis\Integrated-Vision-Inspection-System-IVIS\src\app.py", line 248, in 
    main()
  File "C:\Users\user\Code\ivis\Integrated-Vision-Inspection-System-IVIS\src\app.py", line 121, in main
    from project.project_management import NewProject, Project
  File "C:\Users\user\Code\ivis\Integrated-Vision-Inspection-System-IVIS\src\lib\project\project_management.py", line 49, in 
    from machine_learning.utils import generate_mask_images, get_coco_classes
  File "C:\Users\user\Code\ivis\Integrated-Vision-Inspection-System-IVIS\src\lib\machine_learning\utils.py", line 21, in 
    from pycocotools.coco import COCO
  File "C:\Users\user\anaconda3\envs\ivis\lib\site-packages\pycocotools\coco.py", line 52, in 
    from . import mask as maskUtils
  File "C:\Users\user\anaconda3\envs\ivis\lib\site-packages\pycocotools\mask.py", line 3, in 
    import pycocotools._mask as _mask
  File "pycocotools/_mask.pyx", line 1, in init pycocotools._mask
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject`
 

To Reproduce
Steps to reproduce the behavior:

  1. Install the app according to https://github.com/msf4-0/Integrated-Vision-Inspection-System-IVIS/files/8196606/IntegrateVisionSystemNativeInstall.Windows.pdf
  2. Run streamlit run src\app.py

Expected behavior
We expect the app to start as indicated by the installation instructions

Desktop

  • OS: Windows 10 build 19044.1586
  • Browser: Google Chrome Version 100.0.4896.75

Additional context
The issue was solved after upgrading numpy to version 1.22.3. Reference: https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp

Recommendation
We are currently testing the other functionalities of the app using the later version of numpy and everything works fine so far. If it continues to do so the numpy dependency could be upgraded to version 1.22.3

"No tables found" error at "Creating Database Configuration" page

Describe the bug
This bug happens from a fresh installation of IVIS app using native Windows installation method. This bug causes user to be unable to proceed from the "Creating Database Configuration" page in IVIS app. I've checked that the details submitted in this page are all correct, and also can see the "Successfully connected to database postgres" message appears after clicking on the submit button, but nothing happens afterward.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a fresh installation on IVIS using native Windows installation method.
  2. The PC is updated with the most recent Windows update.
  3. Most software are installed recently, mainly the relevant one:
  • Microsoft Visual Studio 2022
  • Postgres version 16
  1. All the IVIS python packages are installed in a new Anaconda environment.
  2. After following the installation steps, and launching IVIS for the first time, IVIS prompt an error indicating a missing package: html5lib
  3. Closed IVIS app to pip install html5lib.
  4. Launch IVIS app again, filled in the details in "Creating Database Configuration" page.

Expected behavior
After clicking on the submit button after filling in the correct details in "Creating Database Configuration" page, nothing happen. The app unable to proceed from this point onward

IVIS Log (error log at the last few lines)

[INFO] Logging console outputs to C:\Users\suhaimi\vision_system_logs\logs_2023-11-23_17-25-52_775711.txt
2023-11-23 17:25:53.070860: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-11-23 17:25:53.579754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 2783 MB memory:  -> device: 0, name: Quadro P620, pci bus id: 0000:01:00.0, compute capability: 6.1
[INFO] 23-Nov-23 17:25:53 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:26:01 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:26:01 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:26:01 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:26:02 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:26:02 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:26:02 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:26:03 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:26:03 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:26:03 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:14 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:14 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:14 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:15 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:15 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:15 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:16 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:16 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:16 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:18 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:18 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:18 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:19 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:19 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:19 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:19 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:20 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:21 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:21 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:22 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:22 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:22 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:22 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:23 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:23 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:23 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:30:15 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:30:15 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:30:16 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:30:16 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:30:16 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:30:16 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:30:18 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:30:18 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:30:18 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs

Bypass
There is a bypass method for this, as I've noticed that IVIS unable to proceed because it does not generate the secrets.toml file. So to bypass this, I've manually created the secrets.toml and place in the .streamlit folder within the IVIS file directory. With the presence of the secrets.toml file, IVIS will skip this "Creating Database Configuration" page and proceed to the main login page.

At this point, I can use the UI of the page, but also encountered some other errors in other pages of the app. I suspect those errors are the consequences of this bypass.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.