RAPTOR-AI Project

RAPTOR-AI Project -- RARiS, Tohoku University

Radiation Protection Toolkit for Radioisotopes with Artificial Intelligence (RAPTOR-AI)

by: Research Center for Accelerator and Radioisotope Science (RARiS)

Tohoku University

A free and open-source AI model coupled with PHITS Monte Carlo package.

The current model incorporates deep learning object detection using our proprietary trained models. This advanced approach enables the simulation of human phantom movement and the generation of various slab shielding materials through straightforward 2-dimensional markup images. By employing different colors, users can quickly and easily model a variety of shielding materials, allowing for rapid and efficient scenario creation and analysis. This innovation streamlines the process of visualizing and assessing the effectiveness of different shielding configurations, making it both accessible and highly efficient for diverse applications in radiation protection and safety.

Additionally, we have developed and integrated a custom code editor and image viewer within the program. This robust feature allows users to upload maps with designated human locations, facilitating comprehensive radiation protection studies for various common radioactive sources. Users can easily visualize and analyze potential radiation exposure scenarios, leveraging the power of our advanced tools to enhance the accuracy and depth of their safety assessments. This all-in-one solution streamlines the workflow, enabling detailed and user-friendly evaluations of radiation protection measures in diverse environments.

RAPTOR-AI offers an intuitive platform for both novice and experienced users to model radiation transport, interaction, and dispersion within a 3-dimensional coordinate system, including detailed human organ structures. Leveraging the powerful PHITS Monte Carlo package, RAPTOR-AI eliminates the need for users to write any code, making advanced radiation simulations accessible and user-friendly. With RAPTOR-AI, users can effortlessly explore complex radiation phenomena and obtain precise results without any programming expertise.

Key Highlights of RAPTOR-AI Model:

Developers:

Developers

Dr. Mehrdad S. Beni is a research fellow at Tohoku University, Japan. He has a Ph.D. in Physics from City University of Hong Kong. His interests are nuclear physics, radiation physics and computational physics.

Prof. Hiroshi Watabe is a professor at Tohoku University, Japan. He received Ph.D. in nuclear engineering from Tohoku University. He has been in Division of Radiation Protection and Nuclear Safety Research Center for Accelerator and Radioisotope Science, Tohoku University, Japan. Since 2015, he has been a professor. His research interest includes nuclear medicine physics, nuclear engineering in medicine and radiation dosimetry.

This project has been significantly enhanced by the expertise and dedication of several key collaborators:

User Manual

Here is a detailed guide on how to use RAPTOR-AI, including the necessary prerequisites for a successful deployment of the model:

img1
Figure 1: Simple representation of human phantom location (black solid dot) and slab shield (rectangle) on a 2D markup image.
img2
Figure 2: Create image dialog in GIMP.
img3
Figure 3: Created 500 by 500 px image canvas in GIMP.
img4
Figure 4: Selecting Pencil Tool in GIMP.
img5
Figure 5: Selecting brush style (rectangle) in GIMP.
img6
Figure 6: Selecting foreground color in GIMP.
img7
Figure 7: Selecting foreground color using color selector and HTML notation (000000 is black) in GIMP.

Note color shades are not preferred. For black use 000000. For blue use 0000ff. For red use ff0000. For green use 00ff00. These will ensure you have pure black, blue, red and green colors.

img8
Figure 8: Selecting pencil tool parameters such as size and aspect ratio in GIMP.
img9
Figure 9: Drawing rectangle representating a slab shield in GIMP.
img10
Figure 10: Drawing human phantom location using circular pencil/brush style with 100% hardness in GIMP.

Note human phantom location must be only circular with 100% hardness and only black color. Make sure the size of the drawn solid circle is not too small and also not too large, for example as shown in figure 10, for a 500 cm x 500 cm domain the tool size was set to 20.00 px.

img11
Figure 11: PNG image export setup in GIMP (when prompted with this dialog you can just click on Export button).

It needs to be noted that different shield color represent differeny materials in the RAPTOR-AI model. We have set black color rectangles to represent lead slab shields, blue color rectangles to represent concrete slab shields, red color rectangles to represent polyethylene slab shields and green rectangles to represent custom user-defined slab shields.

-----------------------------------------------------------------------

------------------------------------------------------

------------------------------------------

The step-by-step tutorial for using RAPTOR-AI on Ubuntu 22.04 GNU/Linux operating system using terminal built in operating system

sudo apt update and sudo apt upgrade -- these command will updated your system packages.

sudo apt install python3 python3-pip python3-tk python3-pil python3-pil.imagetk python3-venv

python3 -m venv .venv

source .venv/bin/activate

sudo apt install git -- this command install git

git clone https://github.com/msbCyricTohoku/RAPTOR-AI -- this command clones Tkinter version of RAPTOR-AI

git clone https://github.com/msbCyricTohoku/RAPTOR-AI-Qt -- this command clones Qt version of RAPTOR-AI

Here you can choose to use the Tkinter version GUI which has a simple and minimal look and feel or if you wish to have a more modern look and feel you can use the Qt version of RAPTOR-AI.

********************************************************

In case of choosing Qt version, additional libraries and packages must be installed, use the following to install them:

python3 -m pip install PyQt6 or pip install PyQt6

pip install pyqt6==6.4.2

pip install pyqt6-qt6==6.4.2

pip install PySide6

Note: for the Qt version, we have noticed it will work better with wayland rather than xorg. Please switch if needed.

********************************************************

Please note that we will focus on the Tkinter version of the RAPTOR-AI here, operations would be similar to the Qt version.

cd RAPTOR-AI -- this command changes user directory

The program directory would be as shown in Figure 12 below:

img12
Figure 12: RAPTOR-AI program folder cloned from the github repository containing latest source code.

make install -- this command this installs all the dependencies (see Figure 13)

img13
Figure 13: make install command on the terminal in the RAPTOR-AI cloned directory.

Please note that if make command is not installed on your system, just install it by sudo apt install make

make -- this command runs RAPTOR-AI

img14
Figure 14: Graphical user interface of RAPTOR-AI.
img15
Figure 15: Opening the PNG image in RAPTOR-AI graphical user interface.
img16
Figure 16: Opening the PNG image in RAPTOR-AI graphical user interface.
img17
Figure 17: Detected features after running RAPTOR-AI.

In the terminal users can check the progress of the run model (also check for errors and issues) and the program will automatically print information about the model run and its output, for our example 2D markup image will be as shown in Figure 18 below:

img18
Figure 18: Terminal output from RAPTOR-AI.
img19
Figure 19: The working_dir folder content after running the RAPTOR-AI model on sample 2D markup image.
img20
Figure 20: The config.ini and model_loader.ini control files.
img21
Figure 21: The content of config.ini file.

The definition of the parameters in config.ini are (users can change these parameters as they wish):

Please note that all densities are in unit of g/cm3. In addition, the material definition must follow ZZZAAA notation following the atomic or weight percent.

img22
Figure 22: The content of model_loader.ini file.

The definition of the parameters in model_loader.ini are (users can change these parameters as they wish):

 

Examples

In this section two examples were provided that users can use to reproduce using their copy of RAPTOR-AI that helps them to familiarize with the present model:

Example 1:

Example 1 all files can be downloaded from here

The following 2D markup image was created using GIMP (see Figure 1 below):

img1
Figure 1: The 2D markup image example.

The image was uploaded into RAPTOR-AI and the model run was completed with detected features (see Figure 2 below):

img2
Figure 2: RAPTOR-AI model in action.

The terminal output during the model run can be seen in Figure 3 below. Please note that our RAPTOR-AI model has the ability to detect overlaps between slab shields and resolve them in the generated PHITS code script. :

img3
Figure 3: RAPTOR-AI terminal output prompts after successful run.

The final generated position 1 has been visualized by PHIG3D 3D viewer and can be seen in Figure 4 below:

img4
Figure 4: 3D visualization of RAPTOR-AI generated model.

Example 2:

Example 2 all files can be downloaded from here

The following 2D markup image was created using GIMP (see Figure 5 below):

img5
Figure 5: The 2D markup image example.

The image was uploaded into RAPTOR-AI and the model run was completed with detected features (see Figure 6 below):

img6
Figure 6: RAPTOR-AI model in action.

The terminal output during the model run can be seen in Figure 7 below. Please note that our RAPTOR-AI model has the ability to detect overlaps between slab shields and resolve them in the generated PHITS code script. :

img7
Figure 7: RAPTOR-AI terminal output prompts after successful run.

The final generated position 1 has been visualized by PHIG3D 3D viewer and can be seen in Figure 8 below:

img8
Figure 8: 3D visualization of RAPTOR-AI generated model.

Trained Models

In this section we will provide our trained models that users can download and use with their downloaded copy of RAPTOR-AI. These models must be placed under trained_model folder under main program directory. Also the model_loader.ini file must be set to read the desired downloaded model.

RAPTOR-AI model trained on 2024-07-25 can be downloaded from here
RAPTOR-AI model trained on 2024-08-05 can be downloaded from here

Please note that, you can download and check which of the trained models work best for your application. We always try to enhance our trained models by including cases with complex geometrical features.

Kamakura-- Code Editor

A lightweight and open-source code editor with syntax highlighting for PHITS package written in C++ and Qt by Mehrdad S. Beni and Hiroshi Watabe 2023.

A simplified and stripped-down version of the Kamakura multi-functional PHITS code editor, hence the "--" (minus minus)

img1
Figure 1: Kamakura-- Code Editor.
  1. Open a PHITS script
  2. For syntax highlighting your files must have ".i" or ".inp" extension
  3. You can use ctrl+tab to move between different tabs
  4. You can search, replace
  5. You can drag and drop your files to the top bar for it to open automatically
  6. You can zoom in and out
  7. Make sure to save your changes!

Kamakura-- can be downloaded for both GNU/Linux and Windows from the following link.

Kamakura- - A lightweight PHITS code editor for Monte Carlo modelling

Kamakura-- github page link is as follow:

A simplified and stripped-down version of the Kamakura multi-functional PHITS code editor, hence the "--" (minus minus)

Note to MCNP users: since many of PHITS commands and MCNP commands are similar, you can save your inputs as .inp or .i and use Kamakura-- to enjoy the syntax highlighting. It needs to also be noted that there might be few/some compatibility issues as well.

img2
About Kamakura-- Code Editor.

Kabuto Image Converter/Viewer

A simple EPS viewer and converter to PNG program based on C++ and GTK3. by Mehrdad S. Beni and Hiroshi Watabe 2024.


Kabuto github page link is as follow:

A simple EPS viewer and converter to PNG program based on C++ and GTK3

 


How to:

  1. Kabuto is only supported on GNU/Linux operating system
  2. run sudo apt install libgtk-3-dev to install the required libraries
  3. run make to compile the program from source
  4. run ./Kabuto to execute the program
img1
Figure 1: Kabuto image viewer and converter.
img2
Kabuto program icon

Why only GNU/Linux

From the developers: We are using GNU/Linux operating system on our main systems daily. There are several reasons we do NOT use Windows or Mac, that are;

  1. Free and Open-Source: GNU/Linux is free (as in freedom) and open-source.
  2. Comprehensive Toolset: GNU/Linux provides all the necessary tools for our work.
  3. Familiarity: We have extensive experience working with GNU/Linux.
  4. Efficient Debugging and Maintenance: Debugging and maintaining our models is much easier on GNU/Linux.
  5. Customizability: GNU/Linux allows full customization of the development environment.
  6. Package Management: Efficient software management through powerful package managers.
  7. Scripting and Automation: Robust support for shell scripting and automation.
  8. Lightweight and Efficient: Ideal for older hardware with a fast, responsive environment.
  9. Security and Privacy: More secure with regular updates and strong user permissions.
  10. Cutting-Edge Tools: Early access to the latest development technology.
  11. Stability: Known for its stability, especially in long-term support versions.
  12. Support for Multiple Languages: Natively supports a wide range of programming languages.
  13. Community Support: Large, active, and supportive open-source community.
  14. Open Source Ecosystem: Developers can contribute to the tools they use.
  15. Native CLI: Offers better control with a powerful command-line interface.
  16. Virtualization and Containerization: Natively supports Docker, Kubernetes, and more.
  17. Networking and Server Management: Ideal for building and deploying web services.

For Microsoft Windows Users:

We recommend you to install virtualbox and install a simple to use GNU/Linux distro like Ubuntu 22.04 to use the tools that we have developed in an efficient manner. There are several useful tutorials on the web that can used to install a Ubuntu 22.04 virtual machine on your system.

At this time, we regret that we do not have the necessary time and resources to develop and maintain Windows versions of the tools we have created. We sincerely appreciate your understanding and patience.

Contact

Please feel free to contact the developers at:

ben.sh[at]tohoku.ac.jp -- change [at] to @

and/or

hwatabe[at]tohoku.ac.jp -- change [at] to @

end