1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! Vision utilities module
//!
//! This module provides a comprehensive suite of computer vision utilities organized into
//! specialized submodules for maintainability and ease of use. The utilities are designed
//! to work seamlessly with ToRSh tensors and provide PyTorch-compatible functionality.
//!
//! ## Module Organization
//!
//! The vision utilities are organized into 9 specialized modules:
//!
//! ### Core Data Operations
//! - [`image_conversion`] - Tensor/image conversion with normalization support
//! - [`image_io`] - File I/O operations for images and datasets
//! - [`image_processing`] - Basic image processing operations (resize, normalize, etc.)
//!
//! ### Analysis and Metrics
//! - [`statistics`] - Statistical analysis and image quality metrics (PSNR, SSIM, etc.)
//!
//! ### Rendering and Visualization
//! - [`text_rendering`] - Text rendering system with built-in fonts
//! - [`visualization`] - 2D visualization utilities (grids, bounding boxes)
//! - [`visualization_3d`] - 3D visualization engine for tensors and activations
//!
//! ### Performance and Interaction
//! - [`performance`] - Caching, prefetching, and performance optimization
//! - [`interactive`] - Interactive viewers and HTML generation
//!
//! ## Usage Examples
//!
//! ```rust
//! use torsh_vision::utils::{
//! // Image conversion
//! tensor_to_image, image_to_tensor,
//! // Visualization
//! make_grid, draw_bounding_boxes,
//! // Statistics
//! psnr, ssim,
//! // Interactive tools
//! create_interactive_viewer,
//! };
//! ```
//!
//! ## Backward Compatibility
//!
//! All existing imports and function calls remain fully compatible. The modular
//! organization enhances maintainability while preserving the existing API.
// ================================
// Module Declarations
// ================================
// ================================
// Core Data Operations
// ================================
/// Image/tensor conversion utilities with normalization support
pub use ;
/// File I/O operations for images and datasets
pub use ;
/// Basic image processing operations (resize, normalize, etc.)
pub use ;
// ================================
// Analysis and Metrics
// ================================
/// Statistical analysis and image quality metrics
pub use ;
// ================================
// Rendering and Visualization
// ================================
/// Text rendering system with built-in fonts
pub use ;
/// 2D visualization utilities (grids, bounding boxes, etc.)
pub use ;
/// 3D visualization engine for tensors and activations
pub use ;
// ================================
// Performance and Interaction
// ================================
/// Performance optimization infrastructure (caching, prefetching, etc.)
pub use ;
/// Interactive viewers and HTML generation
pub use ;