University of Waterloo

University of Waterloo's Institutional Repository
Not a member yet
    21090 research outputs found

    Towards Pathology-Aware Evaluation and Scalable Preprocessing for Virtual Staining

    No full text
    Virtual staining has emerged as a promising alternative to traditional histological staining techniques, offering reagent-free, non-destructive generation of diagnostic-quality images from label-free modalities. However, two critical challenges hinder its broader adoption: the lack of domain-specific evaluation metrics and the inefficiency of large-scale whole slide image (WSI) preprocessing. Conventional image quality metrics such as SSIM and LPIPS fail to capture the diagnostic relevance of histological structures, while most WSI slicing tools are not optimized for high-throughput virtual staining pipelines. This thesis addresses both challenges. First, we develop a multi-threaded WSI slicing framework tailored for OME-TIFF images, enabling scalable and efficient patch extraction with tile-aware indexing, thread-safe file I/O, and optional in-memory caching. Our method achieves a 6–10× speedup over traditional serial approaches while maintaining minimal memory overhead. Second, we propose PaPIS (Pathological Perceptual Image Similarity), a full-reference, pathology-aware image quality metric. PaPIS leverages deep features extracted from a pretrained cell morphology segmentation model and incorporates Retinex-based feature decomposition to evaluate structural and perceptual fidelity from a diagnostic perspective. Experimental results show that PaPIS correlates better with histological quality than traditional metrics. Finally, we integrate PaPIS as a perceptual loss in a modified CycleGAN model for virtual staining, demonstrating improved visual realism and pathology alignment in both patch-wise and whole-slide outputs. Together, our contributions provide a robust foundation for scalable, pathology-aware virtual staining pipelines

    Modeling and energy management of hangar thermo-electrical microgrid for electric plane charging considering multiple zones and resources

    No full text
    The final publication is available at Elsevier via https://doi.org/10.1016/j.apenergy.2024.124951. © 2025. This manuscript version is made available under the CC-BY-NC-ND 4.0 license http://creativecommons.org/licenses/by-nc-nd/4.0/Achieving net zero goals by 2050 is driving an energy transition towards clean electrical energy. Consequently, many initiatives have been proposed aiming to reduce carbon emissions in the building and transportation sectors, focusing, for instance, on the implementation of efficient heating and cooling systems based on heat pumps and the use of electric planes. Microgrids can effectively integrate thermal and electrical energy resources and loads to satisfy customer demands while providing technical, economic, and environmental benefits. Thus, this paper proposes the implementation of a model of a hangar microgrid and its Energy Management System to optimize the dispatch of resources of such thermo-electrical airport grid, using a Model Predictive Control approach to address uncertainties, and including a detailed building thermal model, heat pump modeling for the heating and cooling systems, and battery degradation. The proposed mathematical model of the Energy Management System is applied to a model of a microgrid being developed for a hangar at the Waterloo Wellington Flight Centre in Ontario, Canada, taking into account the specific characteristics of the microgrid’s components, the expected energy consumption of the equipment and the electric plane used for pilot training based on field measurements, and multi-room temperature control requirements, seeking to ensure a reliable and cost-effective operation, while considering the occupants’ comfort in different spaces. The results indicate that the proposed Energy Management System model, featuring multi-room temperature control through multiple thermal resources, can achieve significant savings in operational costs and CO2 emissions compared to a scenario where the microgrid is not deployed and another where a single-room building thermal model with a single heat pump is included.This work has been supported by the Natural Sciences and Engineering Research Council of Canada (NSERC)

    Computational Methods for Inferring the Structures of Amorphous Materials and Understanding Ionic Diffusivities

    No full text
    The simulation of solid-state electrolytes (SSEs) has allows researchers to directly observe the migration paths of lithium ions, and so has played a pivotal role in elucidating the mechanisms of ionic conduction. Performing these simulations requires three steps: Structure determination, simulation, and analysis. Here, we have developed and tested new computational methods to address key challenges in two of these steps. First, we develop a gradient-based optimization method for determining the structures of amorphous materials from total scattering data. Unlike traditional reverse Monte Carlo approaches that rely on random atomic movements and suffer from slow convergence, our gradient-based method moves atoms to directly minimize the chi-squared goodness-of-fit and potential energy. Our approach was tested on amorphous silicon and a nickel--niobium metallic glass. Convergence was achieved in on the order of 5,000 steps, which is approximately one hundred times faster than existing hybrid Monte Carlo methods. Then, we introduce a method for detecting ion hopping events in SSEs without prior knowledge of site locations. This may be useful when simulating i) new materials, for which the positions of all lithium occupancy sites may be unknown, ii) structural changes (e.g. doping) that introduce local strains that shift site positions, or iii) amorphous materials, where lithium sites may be unknown prior to simulation. Testing our method on Li6PS5Cl and its BH4-doped variant, we recover the cage-forming nature of lithium sites in argyrodite structures, and find that the correlation factor for hops between cages is greater than one, indicating a forward-bias for intercage hops

    An Empirical Study of Privacy Leakage Vulnerability in Third-Party Android Logs Libraries

    No full text
    Mobile logging libraries are essential tools for debugging and monitoring Android applications, yet their privacy implications remain largely unexplored. This paper presents the first large-scale empirical study of privacy risks in Android logging practices, analyzing 48,702 applications from Google Play to identify sensitive data leakage through third-party logging frameworks. Our findings reveal that while logging library adoption is limited (3.4% of applications), nearly half (49.3%) of logging-enabled applications exhibit privacy leaks, creating significant security vulnerabilities. Three dominant libraries—Timber (35.2%), SLF4J (35.1%), and Firebase (29.4%)—account for 99.7% of all verified privacy leakage instances. We identify distinct logging patterns across frameworks, with SLF4J showing balanced log level distribution, Timber concentrating heavily on DEBUG levels (78.5%), and Firebase dominated by Analytics Events (98.0%). Our analysis reveals that privacy violations predominantly stem from indirect data flows (62.5%) requiring intermediate processing steps, with most leaks occurring through moderate-complexity paths of 2-4 statements. User-info sources dominate privacy leaks (69.7%), while user-input sources represent a substantial portion (30.3%), highlighting GUI components as significant risk vectors. Longitudinal analysis of application updates demonstrates that privacy leaks tend to improve over time, indicating growing developer awareness of privacy concerns, though persistent vulnerabilities underscore the need for systematic privacy protection measures. Our study contributes the largest dataset of third-party logging-based privacy violations to date, a reproducible analysis pipeline for future research, and actionable insights for developers and library maintainers. These findings emphasize the critical need for practitioners to recognize both user information and user input as significant privacy threats when implementing third-party logging frameworks in Android applications

    Optimizing post-quantum TLS on embedded clients

    No full text
    Transport Layer Security (TLS) is the most widely used cryptographic protocol on the Internet. It ensures the confidentiality, integrity, and authenticity of application data using a combination of cryptographic primitives including Diffie-Hellman key exchange, digital signatures, cryptographic hash functions, and authenticated encryption with associated data (AEAD). Unfortunately, Peter Shor's quantum integer factorization algorithm and recent progress in engineering large-scale quantum computers posed an existential threat to number-theoretic and elliptic-curve public-key cryptographic algorithms used in TLS. The risk of "harvest-now-decrypt-later" attacks and the enormity of efforts needed to migrate existing digital infrastructure meant that we needed to start transitioning to using post-quantum cryptography (PQC) as soon as possible. Since the earliest public experimentation of adopting PQC in TLS by Google, and the start of NIST's PQC standardization project, a collaboration between government, industry, and academia over the last two decades have produced impressive progress towards a quantum-safe future. As of July 2025, NIST has standardized three PQC algorithms (ML-KEM, ML-DSA, SLH-DSA), and research projects such as Open Quantum Safe (OQS) have integrated PQC algorithms into popular cryptographic protocols (TLS, SSH, VPN, etc.) for experimental deployment and evaluation. While the migration to PQC is gathering momentum, deploying PQC to embedded systems received comparatively less attention despite the proliferation of IoT devices and the growing importance of IoT security. There are fewer readily available embedded TLS libraries with PQC support, and less systematic efforts toward understanding the performance and security impact of deploying post-quantum TLS on embedded clients. In this work, we made several contributions to understanding and optimizing post-quantum TLS on embedded systems. First, we reduced client's computational workload in ephemeral key exchange by replacing IND-CCA KEM with IND-1CCA KEM. Specifically, we proposed methods for constructing IND-1CCA KEM that avoided the expensive re-encryption technique used in the Fujisaki-Okamoto transformation. Second, we implemented KEM-based authentication (KEMTLS) as an alternative to signature-based authentication in TLS. Compared to signature-based authentication, KEM-based authentication reduces bandwidth requirements and allows the client to start sending application data at an earlier time. Last but not least, we provided a clean, simple implementation of post-quantum TLS and KEMTLS with which we benchmarked the handshake performance on an embedded client. By combining these optimization techniques, we reduced client's TLS handshake latency to 84.17 ms, a 34.4% reduction compared to using elliptic-curve algorithms (128.40 ms)

    Synthesis and Analysis of Daptomycin Analogues

    No full text
    Daptomycin (Dap) is a naturally occurring, membrane-active, calcium-dependent cyclic lipodepsipeptide antibiotic (cLPA) which is used as a last-resort antibiotic to treat serious infections caused by Gram-positive (G+) bacteria including Staphylococcus aureus (S. aureus) and vancomycin-resistant enterococci (VRE). The appearance of Dap-resistant (Dap-R) bacteria with increasing frequency has motivated the search for Dap analogues that are active against Dap-R bacteria. Recently, it has been shown that appending hydrophobic groups to tryptophan (Trp) or kynurenine (Kyn) yielded some Dap analogues with improved activity and were active against Dap-R bacteria. Chapter 2 of this thesis describes the synthesis and evaluation of Dap analogues with hydrophobic modifications to the side chain of the D-asparagine (Asn) residue at position 2 to determine if appending hydrophobic groups to D-Asn2 will also result in Dap analogs with improved activity. Eight Asn derivatives were synthesized containing alkyl or hydroxyl groups appended to the primary amide nitrogen of the D-Asn side chain. Dap analogues containing these D-Asn derivatives at position 2 were synthesized using Fmoc (9-fluorenylmethyloxycarbonyl) solid-phase peptide synthesis (SPPS). Dap analogs containing methyl (Me), ethyl (Et), n-propyl (Pr), n-butyl (Bu) and n-hexyl (Hex) on the D-Asn exhibited minimum inhibitory concentration (MIC) values that were 2–4-fold higher than Dap while the n-octyl (Oct) and piperidinyl (Pip) analogs had MIC values that were 8- and 32-fold greater than Dap, respectively. These results demonstrate that the activity of Dap cannot be improved by appending hydrophobic groups to D-Asn2 and suggest that D-Asn2 may not be closely associated with the cell membrane. These results also show that the primary amide of D-Asn2 is not essential for activity while the presence of at least one hydrogen on the nitrogen of the D-Asn2 side chain is very important to activity. Membrane insertion studies using model membranes and fluorescence spectroscopy revealed that the hexyl and octyl analogues were able to insert into membranes even in the absence of Ca²⁺ consistent with their much-increased hydrophobicity compared to Dap. In chapter 3, we wished to determine if it is possible to convert Dap into a Zn+2-dependent antibiotic by substituting the two aspartate (Asp) residues in Dap’s calcium-binding motif, Asp7 and Asp9, with Nγ-hydroxyasparagine (Asn(OH)), an amino acid that has a hydroxamic acid side chain. Hydroxamic acids, known for strong Zn²⁺ chelation, have been used in medicinal chemistry to improve metal-dependent interactions. The synthesis of an Asn(OH) building block with the hydroxamic acid side chain protected with a trityl (Trt) group (Fmoc-Asn(OTrt)-OH) was achieved following a multi-step route starting from Fmoc-Asp(tBu)-OH. Attempts to synthesize Dap analogues containing Asn(OH) at positions 7 or 9 using this building block via Fmoc SPPS failed. However, the synthesis of a Dap analogue containing Asn(OH) at position 2 was successful indicating that incorporation of this residue using this building block is sequence dependent. A new Asn(OH) building block containing a protecting group that is smaller than the Trt group, the dimethoxybenzyl (DMB) group (Fmoc-Asn(ODMB)-OH), was prepared. Attempts to prepare the target peptides using this new building block also failed as were attempts using an Asn(OH) building block with the hydroxamic acid side chain unprotected

    Dual Characterization of Hydrophobically Modified Polyamidoamine Dendrimers and their Surfactant Aggregate Hosts by Pyrene Excimer Fluorescence

    No full text
    This thesis explores why the conformational response of generation-0 polyamidoamine dendrimers end-labeled with four identical 1-pyrenealkanoyl groups (PyCX-PAMAM-G0 with X = 4, 6, 8, 10, and 12 for a butyroyl, hexanoyl, octanoyl, decanoyl, and dodecanoyl linker, respectively) to their local environment makes them excellent molecular probes to investigate surfactant aggregates. The conformation of the dendrimers was studied in polar organic solvents, spherical micelles, and non-spherical surfactant aggregates (NSSA) using pyrene excimer formation (PEF) and the model-free analysis (MFA) of the fluorescence decays. In N,N-dimethylformamide (DMF) and dimethyl sulfoxide (DMSO) and in micelles of sodium dodecyl sulfate (SDS) or dodecyltrimethylammonium bromide (DTAB), the dendrimers with shorter (X = 4, 6, 8) alkanoyl linkers adopted an ideal conformation. In contrast, the PyC10- and PyC12-PAMAM-G0 dendrimers experienced a conformational inversion in pure surfactant micelles driven by the hydrophobicity gradient (HG) generated between the polar surface and the hydrophobic interior of the micelles. The conformational inversion of the PyC10- and PyC12-PAMAM-G0 dendrimers was further investigated with mixed micelles prepared from SDS and DTAB mixtures. The decrease in conformational inversion as the micellar shape evolved from a sphere to an elongated ellipsoid with increasing DTAB content led to the idea of the spatial partitioning theory (SPT). The SPT attributes changes in the average conformation of the dendrimers to the change in the volume fractions of the two regions found inside the mixed micelles, between which the dendrimers partition themselves. These two regions were the polar edge region, which was made of ~ 70 charged SDS molecules, and had a curved surface and a high HG, and a more hydrophobic middle region with a lower surface curvature and a low HG formed by the remaining neutralized surfactants. The SPT provided a robust fundamental framework to predict how the average rate constant () for PEF, obtained from the MFA of the fluorescence decays acquired with the PyCX-PAMAM-G0 samples, was affected by the composition of the NSSA the dendrimers interacted with. The sensitivity of the conformational inversion of the PyC10- and PyC12-PAMAM-G0 dendrimers to their local environment shows the potential of these dendrimers as molecular probes for NSSA formed upon the addition of NaCl or DTAB to aqueous solutions of SDS micelles. Partitioning of the dendrimers with longer C10 and C12 linkers between the edge and middle regions rationalized the changes in observed as a function of salt concentration, DTAB content, or both. The generality of the SPT, which applied to all surfactant systems investigated in this thesis, provided strong support for the two regions coexisting in the NSSA, with the edge region being constituted of the same number of charged surfactants as that found in a pure SDS micelle. This insight led to a proposal for the mechanism leading to the formation of NSSA, when salt or oppositely charged surfactants are added to an SDS aqueous solution. Together, the results presented in this thesis suggest that the PyCX-PAMAM-G0 dendrimers constitute outstanding molecular probes to study NSSA in solution

    Determining the maximum feasible box dimensions and box masses for one-handed box transfers from varying heights

    No full text
    Background: To address continued prevalence of musculoskeletal disorders (MSD) related to manual materials handling (MMH) in logistics and warehousing industries, more effort is being devoted to proactive ergonomics when (re)designing the workspace through the use of digital human models (DHM). However, effectively using a DHM requires the user to estimate how a worker will interact with an object. One example includes guessing when a worker might use one hand versus two when lifting and transferring a box. To avoid guessing we need a better understanding of the determinants for performing one-handed lifts and transfers to inform DHM users on when human-object interactions should be modeled with one-hand verses two. Purpose: The aim of this work was to determine the maximum feasible box dimensions and masses that would permit a one-handed box lift and transfer from three shelf heights. Methods: Two sex-balanced samples of 20 participants completed a series of box transfer tasks from varying shelf heights (ankle, greater trochanter (GT), shoulder height) to a table with their dominant hand. For Study One, participants were instructed to grab a minimally weighed retractable box from either front or top and expand/collapse its dimension until they perceived that they could no longer transfer it with only one hand. For Study Two, participants were instructed to grab the box from either front or top (using the maximum acceptable dimensions from Study One) and to adjust the mass of the box until they perceived that they could no longer transfer it with only one hand. Within-subject repeated measure ANOVA with an alpha value of 0.05 were used for both studies to detect for shelf height or grip orientation differences. Results: The perceived maximum acceptable box width ranged from 70-73% of participant’s hand length. Perceived maximum width decreased with higher shelf height when grasping the box from the top, while staying consistent when grabbing the box from the front regardless of shelf height. Perceived maximum mass was lower when grasping the box from the top regardless of shelf height and was lower when grasping the box from shoulder height compared to ankle height regardless of grip orientation. Discussion: When the box width exceeded 124mm of the person’s hand length and required more than 36.7% wrist strength, people may be more likely to use two hands. The discrepancy in perceived maximum acceptable box width and box mass when grasping from the top at shoulder height was potentially due to awkward hand/wrists posture or line of sight issues. The effects between grip orientation and shelf height on the perceived maximum lifting capacity for one-handed transfers should be considered when proactively designing stock-picking tasks to optimize safety. Additionally, an understanding of the maximum determinants helped set manual material handling limits for one-handed box transfers. Findings from the current investigations provided psychophysical insights into the one-handed lifting capacity of standard cardboard boxes with no handles

    Planning and Replanning Near-optimal Robot Coverage Paths in Partially Unknown Environments

    No full text
    We study the problem of planning near-optimal coverage paths for a robot operating in an environment such that a sensor or tool attached to the robot covers the environment. We consider environments that contain unknown obstacles that are detected by the robot during the execution of the coverage path. Such obstacles necessitate a replan of the coverage path that safely avoids the new obstacles while still minimizing a cost function (coverage time, length, and/or turns). For an environment with known obstacles, existing coverage planning approaches discourage turns in the path by covering the environment along the least number of coverage lines, i.e., straight-line paths. This is because turns not only slow down the robot but also negatively affect the quality of coverage, e.g., tools like cameras and cleaning attachments commonly have poor performance around turns. However, existing approaches do not guarantee the minimum number of coverage lines. To this end, we propose a minimum-turn coverage planning approach, namely optimal axis-parallel rank partitioning (OARP), that guarantees coverage along the minimum number of axis-parallel (horizontal/vertical) coverage lines. Using simulations in real-world environments, we show that OARP improves upon state-of-the-art approaches in terms of turns and coverage time. When there are unknown obstacles in the environment, recomputing such paths online is computationally expensive. In such cases, the robot may have to wait for a safe path to continue coverage, resulting in robot stoppages that increase coverage time. To enable replanning with minimal stoppage, we extend OARP to introduce an anytime coverage replanning approach. Upon detecting a new obstacle in the environment, we replan an initial coverage path obtained from OARP within a given time budget (e.g., time to reach the new obstacle). Given this budget, the replanning approach also aims to minimize the overall path turns and coverage time. We showcase the replanning framework in experiments using an industrial cleaning robot avoiding unknown obstacles. We then study two problems towards improving upon the above framework. First, we analyse the length of the coverage paths returned by OARP and obtain an approximation guarantee that quantifies the sub-optimality of OARP path lengths. Following this, we propose an approach that improves upon this approximation factor and computes shorter coverage paths in practice than OARP. The second problem is to remove the axis-parallel constraint imposed by OARP on the coverage lines. We propose decomposing the environment into sectors, i.e., possibly overlapping rectangular sub-regions that can each be covered by straight-line paths parallel to the longest sector edge. Using results from submodular set cover (SSC) problems, we propose a greedy approach to compute sectors and provide an approximation guarantee on the number of sectors in the decomposition

    Development of Artificial Neural Network Chemistry Framework for Turbulent Combustion of Non-premixed Flames

    No full text
    Detailed chemical kinetics are required to accurately model pollutant formation in turbulent combustion simulations. However, existing methods for representing detailed turbulent combustion chemistry can have prohibitive computational cost. Machine learning (ML) methods are gaining attention for representing detailed chemistry in a computationally efficient manner, however the difficulties in preparing these models limit their application. In this work, artificial neural networks (ANNs) are used to represent non-premixed turbulent combustion chemistry in the Conditional Source-term Estimation (CSE) model, which accounts for detailed kinetics and turbulence-chemistry interactions (TCI). This work represents the first application of ML to CSE. The objectives of the present study are to (i) develop a methodology for representing any chemistry dataset with ANNs in the context of the CSE combustion model, and (ii) apply ANN-CSE to the simulation of two turbulent non-premixed methane jet flames in a Reynolds-Averaged Navier-Stokes (RANS) framework. The ANNs are developed using the MATLAB Deep Learning Toolbox. Two tabulated chemistry datasets are considered for ANN development: Trajectory-Generated Low-Dimensional Manifolds (TGLDM) and samples from direct integration (DI). In addition, pure and diluted methane fuels are considered. Detailed chemistry via GRI-Mech 3.0 and reduced chemistry via Smooke's mechanism is used. A data preparation procedure for ANN development is outlined. The sensitivity of various ANN parameters are also investigated to optimize the ANNs to each dataset. It is found that the ANNs can predict species mass fractions, reaction rates, temperature and heat release rate with good accuracy for each case. The storage requirement is also reduced by over 50\% for each case. ANN-CSE is applied to turbulent non-premixed jet flames with both sets of data and either pure or diluted methane. The predictions of conditional and Favre averages of temperature, species mass fractions and source terms from ANN-CSE are compared to those from CSE with tabulated chemistry (TGLDM-CSE) or direct chemistry (DI-CSE) to verify ANN-CSE. Identical computational settings for each flame are used to verify the influence of the chemistry implementation on the flame structure. For each case, ANN-CSE is generally able to capture the trends of each conditional and Favre-averaged quantity at various locations. In addition, ANN-CSE requires less memory and is faster than regular CSE for each case. This study shows that CSE can be effectively coupled with ANNs for chemistry representation of different mechanisms and sources of data. This will enable CSE for simulating more detailed cases. Future work may involve more complex fuels, more sophisticated ANNs and data preparation, or the Large Eddy Simulation (LES) framework

    17,602

    full texts

    21,090

    metadata records
    Updated in last 30 days.
    University of Waterloo's Institutional Repository
    Access Repository Dashboard
    Do you manage Open Research Online? Become a CORE Member to access insider analytics, issue reports and manage access to outputs from your repository in the CORE Repository Dashboard! 👇