vsegments 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -1
- package/TROUBLESHOOTING.md +256 -0
- package/coverage/clover.xml +33 -25
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/core.js.html +85 -25
- package/coverage/lcov-report/index.html +15 -15
- package/coverage/lcov-report/index.js.html +1 -1
- package/coverage/lcov-report/models.js.html +1 -1
- package/coverage/lcov-report/utils.js.html +1 -1
- package/coverage/lcov-report/visualize.js.html +1 -1
- package/coverage/lcov.info +48 -36
- package/package.json +1 -1
- package/src/core.js +37 -17
package/README.md
CHANGED
|
@@ -171,7 +171,7 @@ await vs.visualize('image.jpg', result, {
|
|
|
171
171
|
### API Options
|
|
172
172
|
|
|
173
173
|
- `--api-key <key>`: Google API key (default: `GOOGLE_API_KEY` env var)
|
|
174
|
-
- `-m, --model <model>`: Model name (default: `gemini-
|
|
174
|
+
- `-m, --model <model>`: Model name (default: `gemini-3-pro-preview`)
|
|
175
175
|
- `--temperature <temp>`: Sampling temperature 0.0-1.0 (default: 0.5)
|
|
176
176
|
- `--max-objects <n>`: Maximum objects to detect (default: 25)
|
|
177
177
|
|
|
@@ -361,6 +361,35 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
361
361
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
362
362
|
5. Open a Pull Request
|
|
363
363
|
|
|
364
|
+
## Troubleshooting
|
|
365
|
+
|
|
366
|
+
### Common Issues
|
|
367
|
+
|
|
368
|
+
#### 500 Internal Server Error
|
|
369
|
+
|
|
370
|
+
If you get a 500 error from the Google Gemini API:
|
|
371
|
+
|
|
372
|
+
1. **Try a different model:**
|
|
373
|
+
```javascript
|
|
374
|
+
const vs = new VSegments({
|
|
375
|
+
apiKey: 'YOUR_API_KEY',
|
|
376
|
+
model: 'gemini-3-pro-preview' // default model
|
|
377
|
+
});
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
2. **Check your image:** Ensure it's under 4MB and in a supported format (JPG, PNG, GIF, WEBP)
|
|
381
|
+
|
|
382
|
+
3. **Wait and retry:** The API may be experiencing temporary issues
|
|
383
|
+
|
|
384
|
+
4. **Verify API key:** Make sure your API key is valid and has proper permissions
|
|
385
|
+
|
|
386
|
+
For more detailed troubleshooting, see [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
|
|
387
|
+
|
|
388
|
+
### Recommended Models
|
|
389
|
+
|
|
390
|
+
- **Default (High quality):** `gemini-3-pro-preview`
|
|
391
|
+
- **Alternative:** `gemini-2.5-flash`
|
|
392
|
+
|
|
364
393
|
## License
|
|
365
394
|
|
|
366
395
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -374,6 +403,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
374
403
|
|
|
375
404
|
- **Issues**: [GitHub Issues](https://github.com/nxtphaseai/vsegments/issues)
|
|
376
405
|
- **Documentation**: [GitHub README](https://github.com/nxtphaseai/vsegments#readme)
|
|
406
|
+
- **Troubleshooting**: [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
|
|
377
407
|
|
|
378
408
|
---
|
|
379
409
|
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
## Common Issues and Solutions
|
|
4
|
+
|
|
5
|
+
### 1. Google Gemini API Errors
|
|
6
|
+
|
|
7
|
+
#### Error: 500 Internal Server Error
|
|
8
|
+
```
|
|
9
|
+
GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/...: [500 Internal Server Error]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Possible Causes:**
|
|
13
|
+
- Temporary API outage
|
|
14
|
+
- Model name is incorrect or unavailable
|
|
15
|
+
- API quota exceeded
|
|
16
|
+
- Image is too large or in unsupported format
|
|
17
|
+
|
|
18
|
+
**Solutions:**
|
|
19
|
+
1. **Try a different model:**
|
|
20
|
+
```javascript
|
|
21
|
+
const vs = new VSegments({
|
|
22
|
+
apiKey: 'YOUR_API_KEY',
|
|
23
|
+
model: 'gemini-3-pro-preview' // Default model
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **Wait and retry:** The API may be experiencing temporary issues
|
|
28
|
+
|
|
29
|
+
3. **Check your API key:** Verify it's valid and has proper permissions
|
|
30
|
+
|
|
31
|
+
4. **Reduce image size:** Ensure images are under 4MB and reasonable dimensions
|
|
32
|
+
|
|
33
|
+
5. **Verify image path:** Make sure the image file exists and is readable
|
|
34
|
+
|
|
35
|
+
#### Error: 403 Forbidden
|
|
36
|
+
```
|
|
37
|
+
GoogleGenerativeAIFetchError: [403 Forbidden]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Causes:**
|
|
41
|
+
- Invalid API key
|
|
42
|
+
- API key doesn't have necessary permissions
|
|
43
|
+
- API not enabled for your project
|
|
44
|
+
|
|
45
|
+
**Solutions:**
|
|
46
|
+
1. Verify your API key is correct
|
|
47
|
+
2. Enable the Generative Language API in Google Cloud Console
|
|
48
|
+
3. Check API key restrictions in Google Cloud Console
|
|
49
|
+
|
|
50
|
+
#### Error: 429 Too Many Requests
|
|
51
|
+
```
|
|
52
|
+
GoogleGenerativeAIFetchError: [429 Too Many Requests]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Causes:**
|
|
56
|
+
- Rate limit exceeded
|
|
57
|
+
- Quota exceeded
|
|
58
|
+
|
|
59
|
+
**Solutions:**
|
|
60
|
+
1. Wait before making more requests
|
|
61
|
+
2. Implement rate limiting in your code
|
|
62
|
+
3. Upgrade your API quota if needed
|
|
63
|
+
|
|
64
|
+
### 2. Image Loading Issues
|
|
65
|
+
|
|
66
|
+
#### Error: Image file not found
|
|
67
|
+
```
|
|
68
|
+
Error: Image file not found: path/to/image.jpg
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Solutions:**
|
|
72
|
+
1. Check the file path is correct (use absolute paths)
|
|
73
|
+
2. Verify the file exists: `ls path/to/image.jpg`
|
|
74
|
+
3. Check file permissions
|
|
75
|
+
|
|
76
|
+
#### Unsupported Image Format
|
|
77
|
+
**Supported formats:** JPG, JPEG, PNG, GIF, WEBP
|
|
78
|
+
|
|
79
|
+
**Solutions:**
|
|
80
|
+
1. Convert your image to a supported format
|
|
81
|
+
2. Check the file extension is correct
|
|
82
|
+
|
|
83
|
+
### 3. Module/Package Issues
|
|
84
|
+
|
|
85
|
+
#### Warning: MODULE_TYPELESS_PACKAGE_JSON
|
|
86
|
+
```
|
|
87
|
+
(node:xxxxx) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///... is not specified
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Solution:**
|
|
91
|
+
Add to your `package.json`:
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"type": "module"
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or use CommonJS syntax:
|
|
99
|
+
```javascript
|
|
100
|
+
const VSegments = require('vsegments');
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Error: Cannot find module 'vsegments'
|
|
104
|
+
```
|
|
105
|
+
Error: Cannot find module 'vsegments'
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Solutions:**
|
|
109
|
+
1. Install the package: `npm install vsegments`
|
|
110
|
+
2. Check you're in the right directory
|
|
111
|
+
3. Verify `node_modules` exists
|
|
112
|
+
|
|
113
|
+
### 4. Segmentation Issues
|
|
114
|
+
|
|
115
|
+
#### No objects detected
|
|
116
|
+
```
|
|
117
|
+
Found 0 objects
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Possible causes:**
|
|
121
|
+
- Image is too simple/blank
|
|
122
|
+
- Objects are not clear enough
|
|
123
|
+
- Prompt is too specific
|
|
124
|
+
|
|
125
|
+
**Solutions:**
|
|
126
|
+
1. Use a clearer image
|
|
127
|
+
2. Try a custom prompt
|
|
128
|
+
3. Adjust the model settings
|
|
129
|
+
|
|
130
|
+
#### Poor segmentation quality
|
|
131
|
+
|
|
132
|
+
**Solutions:**
|
|
133
|
+
1. **Use higher quality images:**
|
|
134
|
+
```javascript
|
|
135
|
+
const result = await vs.segment('image.jpg', {
|
|
136
|
+
maxSize: 2048 // Increase max size
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. **Adjust temperature:**
|
|
141
|
+
```javascript
|
|
142
|
+
const vs = new VSegments({
|
|
143
|
+
apiKey: 'YOUR_API_KEY',
|
|
144
|
+
temperature: 0.2 // Lower = more consistent
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
3. **Use custom prompts:**
|
|
149
|
+
```javascript
|
|
150
|
+
const result = await vs.segment('image.jpg', {
|
|
151
|
+
prompt: 'Detect and segment all people and vehicles in this image'
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 5. Performance Issues
|
|
156
|
+
|
|
157
|
+
#### Slow processing
|
|
158
|
+
|
|
159
|
+
**Solutions:**
|
|
160
|
+
1. **Reduce image size:**
|
|
161
|
+
```javascript
|
|
162
|
+
const result = await vs.segment('image.jpg', {
|
|
163
|
+
maxSize: 512 // Smaller = faster
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
2. **Use recommended model:**
|
|
168
|
+
```javascript
|
|
169
|
+
const vs = new VSegments({
|
|
170
|
+
apiKey: 'YOUR_API_KEY',
|
|
171
|
+
model: 'gemini-3-pro-preview' // Default high-quality model
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
3. **Process images in batches** rather than all at once
|
|
176
|
+
|
|
177
|
+
### 6. Canvas/Visualization Issues
|
|
178
|
+
|
|
179
|
+
#### Error: Cannot find module 'canvas'
|
|
180
|
+
```
|
|
181
|
+
Error: Cannot find module 'canvas'
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Solutions:**
|
|
185
|
+
1. The `canvas` dependency requires native compilation
|
|
186
|
+
2. Install build tools:
|
|
187
|
+
- **macOS:** `xcode-select --install`
|
|
188
|
+
- **Ubuntu/Debian:** `sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev`
|
|
189
|
+
- **Windows:** Install windows-build-tools
|
|
190
|
+
|
|
191
|
+
3. Reinstall canvas: `npm install canvas --build-from-source`
|
|
192
|
+
|
|
193
|
+
## Testing Your Setup
|
|
194
|
+
|
|
195
|
+
Create a simple test script (`test-setup.js`):
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
import VSegments from 'vsegments';
|
|
199
|
+
import fs from 'fs';
|
|
200
|
+
|
|
201
|
+
async function test() {
|
|
202
|
+
console.log('Testing vsegments setup...\n');
|
|
203
|
+
|
|
204
|
+
// 1. Test API key
|
|
205
|
+
const apiKey = process.env.GOOGLE_API_KEY;
|
|
206
|
+
if (!apiKey) {
|
|
207
|
+
console.error('❌ GOOGLE_API_KEY not set');
|
|
208
|
+
process.exit(1);
|
|
209
|
+
}
|
|
210
|
+
console.log('✅ API key found');
|
|
211
|
+
|
|
212
|
+
// 2. Test initialization
|
|
213
|
+
try {
|
|
214
|
+
const vs = new VSegments({ apiKey });
|
|
215
|
+
console.log('✅ VSegments initialized');
|
|
216
|
+
} catch (error) {
|
|
217
|
+
console.error('❌ Initialization failed:', error.message);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// 3. Test image file
|
|
222
|
+
const imagePath = 'test-image.jpg';
|
|
223
|
+
if (!fs.existsSync(imagePath)) {
|
|
224
|
+
console.error(`❌ Test image not found: ${imagePath}`);
|
|
225
|
+
console.log(' Create a test-image.jpg to continue');
|
|
226
|
+
process.exit(1);
|
|
227
|
+
}
|
|
228
|
+
console.log('✅ Test image found');
|
|
229
|
+
|
|
230
|
+
console.log('\n✅ Setup looks good! Try running your script.');
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
test().catch(console.error);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Getting Help
|
|
237
|
+
|
|
238
|
+
If you continue to experience issues:
|
|
239
|
+
|
|
240
|
+
1. **Check the examples:** Review the example scripts in the `examples/` directory
|
|
241
|
+
2. **Review the API documentation:** [Google Gemini API Docs](https://ai.google.dev/docs)
|
|
242
|
+
3. **File an issue:** [GitHub Issues](https://github.com/nxtphaseai/node_vsegments/issues)
|
|
243
|
+
4. **Check API status:** [Google Cloud Status Dashboard](https://status.cloud.google.com/)
|
|
244
|
+
|
|
245
|
+
## Recommended Models (as of December 2025)
|
|
246
|
+
|
|
247
|
+
- **Default (Best quality):** `gemini-3-pro-preview`
|
|
248
|
+
- **Alternative:** `gemini-2.5-flash`
|
|
249
|
+
|
|
250
|
+
Update your code:
|
|
251
|
+
```javascript
|
|
252
|
+
const vs = new VSegments({
|
|
253
|
+
apiKey: 'YOUR_API_KEY',
|
|
254
|
+
model: 'gemini-3-pro-preview' // Default
|
|
255
|
+
});
|
|
256
|
+
```
|
package/coverage/clover.xml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
2
|
+
<coverage generated="1764938703619" clover="3.2.0">
|
|
3
|
+
<project timestamp="1764938703620" name="All files">
|
|
4
|
+
<metrics statements="211" coveredstatements="82" conditionals="73" coveredconditionals="24" methods="24" coveredmethods="12" elements="308" coveredelements="118" complexity="0" loc="211" ncloc="211" packages="1" files="5" classes="5"/>
|
|
5
5
|
<file name="core.js" path="/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/core.js">
|
|
6
|
-
<metrics statements="
|
|
6
|
+
<metrics statements="63" coveredstatements="23" conditionals="35" coveredconditionals="15" methods="7" coveredmethods="3"/>
|
|
7
7
|
<line num="5" count="2" type="stmt"/>
|
|
8
8
|
<line num="6" count="2" type="stmt"/>
|
|
9
9
|
<line num="7" count="2" type="stmt"/>
|
|
@@ -33,32 +33,40 @@
|
|
|
33
33
|
<line num="121" count="0" type="stmt"/>
|
|
34
34
|
<line num="124" count="0" type="stmt"/>
|
|
35
35
|
<line num="127" count="0" type="stmt"/>
|
|
36
|
-
<line num="
|
|
37
|
-
<line num="
|
|
38
|
-
<line num="
|
|
39
|
-
<line num="
|
|
36
|
+
<line num="135" count="0" type="stmt"/>
|
|
37
|
+
<line num="136" count="0" type="stmt"/>
|
|
38
|
+
<line num="143" count="0" type="stmt"/>
|
|
39
|
+
<line num="144" count="0" type="stmt"/>
|
|
40
|
+
<line num="146" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
40
41
|
<line num="147" count="0" type="stmt"/>
|
|
41
|
-
<line num="
|
|
42
|
-
<line num="
|
|
43
|
-
<line num="
|
|
44
|
-
<line num="
|
|
45
|
-
<line num="
|
|
46
|
-
<line num="
|
|
42
|
+
<line num="151" count="0" type="stmt"/>
|
|
43
|
+
<line num="155" count="0" type="stmt"/>
|
|
44
|
+
<line num="157" count="0" type="stmt"/>
|
|
45
|
+
<line num="172" count="0" type="stmt"/>
|
|
46
|
+
<line num="175" count="0" type="stmt"/>
|
|
47
|
+
<line num="178" count="0" type="stmt"/>
|
|
47
48
|
<line num="179" count="0" type="stmt"/>
|
|
48
|
-
<line num="
|
|
49
|
-
<line num="
|
|
49
|
+
<line num="180" count="0" type="stmt"/>
|
|
50
|
+
<line num="183" count="0" type="stmt"/>
|
|
50
51
|
<line num="190" count="0" type="stmt"/>
|
|
51
52
|
<line num="191" count="0" type="stmt"/>
|
|
52
|
-
<line num="
|
|
53
|
+
<line num="198" count="0" type="stmt"/>
|
|
54
|
+
<line num="199" count="0" type="stmt"/>
|
|
55
|
+
<line num="201" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
56
|
+
<line num="202" count="0" type="stmt"/>
|
|
57
|
+
<line num="206" count="0" type="stmt"/>
|
|
58
|
+
<line num="210" count="0" type="stmt"/>
|
|
59
|
+
<line num="211" count="0" type="stmt"/>
|
|
53
60
|
<line num="213" count="0" type="stmt"/>
|
|
54
|
-
<line num="
|
|
55
|
-
<line num="
|
|
56
|
-
<line num="
|
|
57
|
-
<line num="
|
|
58
|
-
<line num="
|
|
59
|
-
<line num="
|
|
60
|
-
<line num="
|
|
61
|
-
<line num="
|
|
61
|
+
<line num="233" count="0" type="stmt"/>
|
|
62
|
+
<line num="236" count="0" type="stmt"/>
|
|
63
|
+
<line num="239" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
64
|
+
<line num="240" count="0" type="stmt"/>
|
|
65
|
+
<line num="246" count="0" type="stmt"/>
|
|
66
|
+
<line num="253" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
67
|
+
<line num="254" count="0" type="stmt"/>
|
|
68
|
+
<line num="257" count="0" type="stmt"/>
|
|
69
|
+
<line num="261" count="2" type="stmt"/>
|
|
62
70
|
</file>
|
|
63
71
|
<file name="index.js" path="/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/index.js">
|
|
64
72
|
<metrics statements="8" coveredstatements="8" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/core.js": {"path":"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/core.js","statementMap":{"0":{"start":{"line":5,"column":31},"end":{"line":5,"column":63}},"1":{"start":{"line":6,"column":22},"end":{"line":6,"column":39}},"2":{"start":{"line":7,"column":11},"end":{"line":7,"column":33}},"3":{"start":{"line":8,"column":31},"end":{"line":8,"column":50}},"4":{"start":{"line":9,"column":55},"end":{"line":9,"column":73}},"5":{"start":{"line":15,"column":4},"end":{"line":15,"column":26}},"6":{"start":{"line":27,"column":4},"end":{"line":27,"column":63}},"7":{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},"8":{"start":{"line":30,"column":6},"end":{"line":32,"column":8}},"9":{"start":{"line":35,"column":4},"end":{"line":35,"column":56}},"10":{"start":{"line":36,"column":4},"end":{"line":36,"column":85}},"11":{"start":{"line":37,"column":4},"end":{"line":37,"column":47}},"12":{"start":{"line":40,"column":4},"end":{"line":40,"column":53}},"13":{"start":{"line":43,"column":4},"end":{"line":46,"column":13}},"14":{"start":{"line":49,"column":4},"end":{"line":54,"column":6}},"15":{"start":{"line":63,"column":24},"end":{"line":63,"column":52}},"16":{"start":{"line":64,"column":23},"end":{"line":64,"column":53}},"17":{"start":{"line":65,"column":21},"end":{"line":65,"column":49}},"18":{"start":{"line":67,"column":4},"end":{"line":72,"column":6}},"19":{"start":{"line":81,"column":16},"end":{"line":81,"column":55}},"20":{"start":{"line":82,"column":22},"end":{"line":88,"column":5}},"21":{"start":{"line":89,"column":4},"end":{"line":89,"column":42}},"22":{"start":{"line":98,"column":23},"end":{"line":98,"column":53}},"23":{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},"24":{"start":{"line":101,"column":6},"end":{"line":101,"column":48}},"25":{"start":{"line":104,"column":4},"end":{"line":104,"column":24}},"26":{"start":{"line":121,"column":8},"end":{"line":121,"column":15}},"27":{"start":{"line":124,"column":18},"end":{"line":124,"column":50}},"28":{"start":{"line":127,"column":18},"end":{"line":131,"column":6}},"29":{"start":{"line":134,"column":19},"end":{"line":139,"column":6}},"30":{"start":{"line":141,"column":21},"end":{"line":141,"column":36}},"31":{"start":{"line":142,"column":17},"end":{"line":142,"column":32}},"32":{"start":{"line":145,"column":18},"end":{"line":145,"column":42}},"33":{"start":{"line":147,"column":4},"end":{"line":147,"column":53}},"34":{"start":{"line":162,"column":8},"end":{"line":162,"column":15}},"35":{"start":{"line":165,"column":18},"end":{"line":165,"column":50}},"36":{"start":{"line":168,"column":16},"end":{"line":168,"column":42}},"37":{"start":{"line":169,"column":21},"end":{"line":169,"column":30}},"38":{"start":{"line":170,"column":22},"end":{"line":170,"column":32}},"39":{"start":{"line":173,"column":18},"end":{"line":176,"column":6}},"40":{"start":{"line":179,"column":19},"end":{"line":184,"column":6}},"41":{"start":{"line":186,"column":21},"end":{"line":186,"column":36}},"42":{"start":{"line":187,"column":17},"end":{"line":187,"column":32}},"43":{"start":{"line":190,"column":18},"end":{"line":190,"column":42}},"44":{"start":{"line":191,"column":18},"end":{"line":191,"column":73}},"45":{"start":{"line":193,"column":4},"end":{"line":193,"column":54}},"46":{"start":{"line":213,"column":8},"end":{"line":213,"column":15}},"47":{"start":{"line":216,"column":19},"end":{"line":216,"column":59}},"48":{"start":{"line":219,"column":4},"end":{"line":230,"column":5}},"49":{"start":{"line":220,"column":6},"end":{"line":224,"column":9}},"50":{"start":{"line":226,"column":6},"end":{"line":229,"column":9}},"51":{"start":{"line":233,"column":4},"end":{"line":235,"column":5}},"52":{"start":{"line":234,"column":6},"end":{"line":234,"column":43}},"53":{"start":{"line":237,"column":4},"end":{"line":237,"column":18}},"54":{"start":{"line":241,"column":0},"end":{"line":241,"column":27}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":26,"column":2},"end":{"line":26,"column":3}},"loc":{"start":{"line":26,"column":28},"end":{"line":55,"column":3}},"line":26},"1":{"name":"(anonymous_1)","decl":{"start":{"line":62,"column":2},"end":{"line":62,"column":3}},"loc":{"start":{"line":62,"column":30},"end":{"line":73,"column":3}},"line":62},"2":{"name":"(anonymous_2)","decl":{"start":{"line":80,"column":2},"end":{"line":80,"column":3}},"loc":{"start":{"line":80,"column":25},"end":{"line":90,"column":3}},"line":80},"3":{"name":"(anonymous_3)","decl":{"start":{"line":97,"column":2},"end":{"line":97,"column":3}},"loc":{"start":{"line":97,"column":45},"end":{"line":105,"column":3}},"line":97},"4":{"name":"(anonymous_4)","decl":{"start":{"line":116,"column":2},"end":{"line":116,"column":3}},"loc":{"start":{"line":116,"column":45},"end":{"line":148,"column":3}},"line":116},"5":{"name":"(anonymous_5)","decl":{"start":{"line":158,"column":2},"end":{"line":158,"column":3}},"loc":{"start":{"line":158,"column":41},"end":{"line":194,"column":3}},"line":158},"6":{"name":"(anonymous_6)","decl":{"start":{"line":207,"column":2},"end":{"line":207,"column":3}},"loc":{"start":{"line":207,"column":51},"end":{"line":238,"column":3}},"line":207}},"branchMap":{"0":{"loc":{"start":{"line":26,"column":14},"end":{"line":26,"column":26}},"type":"default-arg","locations":[{"start":{"line":26,"column":24},"end":{"line":26,"column":26}}],"line":26},"1":{"loc":{"start":{"line":27,"column":18},"end":{"line":27,"column":62}},"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":32}},{"start":{"line":27,"column":36},"end":{"line":27,"column":62}}],"line":27},"2":{"loc":{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},{"start":{},"end":{}}],"line":29},"3":{"loc":{"start":{"line":35,"column":17},"end":{"line":35,"column":55}},"type":"binary-expr","locations":[{"start":{"line":35,"column":17},"end":{"line":35,"column":30}},{"start":{"line":35,"column":34},"end":{"line":35,"column":55}}],"line":35},"4":{"loc":{"start":{"line":36,"column":23},"end":{"line":36,"column":84}},"type":"cond-expr","locations":[{"start":{"line":36,"column":59},"end":{"line":36,"column":78}},{"start":{"line":36,"column":81},"end":{"line":36,"column":84}}],"line":36},"5":{"loc":{"start":{"line":37,"column":22},"end":{"line":37,"column":46}},"type":"binary-expr","locations":[{"start":{"line":37,"column":22},"end":{"line":37,"column":40}},{"start":{"line":37,"column":44},"end":{"line":37,"column":46}}],"line":37},"6":{"loc":{"start":{"line":89,"column":11},"end":{"line":89,"column":41}},"type":"binary-expr","locations":[{"start":{"line":89,"column":11},"end":{"line":89,"column":25}},{"start":{"line":89,"column":29},"end":{"line":89,"column":41}}],"line":89},"7":{"loc":{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},"type":"if","locations":[{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},{"start":{},"end":{}}],"line":100},"8":{"loc":{"start":{"line":116,"column":31},"end":{"line":116,"column":43}},"type":"default-arg","locations":[{"start":{"line":116,"column":41},"end":{"line":116,"column":43}}],"line":116},"9":{"loc":{"start":{"line":118,"column":6},"end":{"line":118,"column":45}},"type":"default-arg","locations":[{"start":{"line":118,"column":15},"end":{"line":118,"column":45}}],"line":118},"10":{"loc":{"start":{"line":119,"column":6},"end":{"line":119,"column":31}},"type":"default-arg","locations":[{"start":{"line":119,"column":27},"end":{"line":119,"column":31}}],"line":119},"11":{"loc":{"start":{"line":120,"column":6},"end":{"line":120,"column":20}},"type":"default-arg","locations":[{"start":{"line":120,"column":16},"end":{"line":120,"column":20}}],"line":120},"12":{"loc":{"start":{"line":158,"column":27},"end":{"line":158,"column":39}},"type":"default-arg","locations":[{"start":{"line":158,"column":37},"end":{"line":158,"column":39}}],"line":158},"13":{"loc":{"start":{"line":160,"column":6},"end":{"line":160,"column":269}},"type":"default-arg","locations":[{"start":{"line":160,"column":15},"end":{"line":160,"column":269}}],"line":160},"14":{"loc":{"start":{"line":161,"column":6},"end":{"line":161,"column":20}},"type":"default-arg","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":20}}],"line":161},"15":{"loc":{"start":{"line":207,"column":37},"end":{"line":207,"column":49}},"type":"default-arg","locations":[{"start":{"line":207,"column":47},"end":{"line":207,"column":49}}],"line":207},"16":{"loc":{"start":{"line":209,"column":6},"end":{"line":209,"column":23}},"type":"default-arg","locations":[{"start":{"line":209,"column":19},"end":{"line":209,"column":23}}],"line":209},"17":{"loc":{"start":{"line":210,"column":6},"end":{"line":210,"column":19}},"type":"default-arg","locations":[{"start":{"line":210,"column":18},"end":{"line":210,"column":19}}],"line":210},"18":{"loc":{"start":{"line":211,"column":6},"end":{"line":211,"column":19}},"type":"default-arg","locations":[{"start":{"line":211,"column":17},"end":{"line":211,"column":19}}],"line":211},"19":{"loc":{"start":{"line":212,"column":6},"end":{"line":212,"column":17}},"type":"default-arg","locations":[{"start":{"line":212,"column":14},"end":{"line":212,"column":17}}],"line":212},"20":{"loc":{"start":{"line":219,"column":4},"end":{"line":230,"column":5}},"type":"if","locations":[{"start":{"line":219,"column":4},"end":{"line":230,"column":5}},{"start":{"line":225,"column":11},"end":{"line":230,"column":5}}],"line":219},"21":{"loc":{"start":{"line":233,"column":4},"end":{"line":235,"column":5}},"type":"if","locations":[{"start":{"line":233,"column":4},"end":{"line":235,"column":5}},{"start":{},"end":{}}],"line":233}},"s":{"0":2,"1":2,"2":2,"3":2,"4":2,"5":2,"6":23,"7":23,"8":1,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":0,"16":0,"17":0,"18":0,"19":9,"20":9,"21":9,"22":3,"23":3,"24":1,"25":3,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":2},"f":{"0":23,"1":0,"2":9,"3":3,"4":0,"5":0,"6":0},"b":{"0":[2],"1":[23,2],"2":[1,22],"3":[22,21],"4":[2,20],"5":[22,17],"6":[9,2],"7":[1,2],"8":[0],"9":[0],"10":[0],"11":[0],"12":[0],"13":[0],"14":[0],"15":[0],"16":[0],"17":[0],"18":[0],"19":[0],"20":[0,0],"21":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"bf6161d7489f642b263454c505b791081bf6a6eb"}
|
|
1
|
+
{"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/core.js": {"path":"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/core.js","statementMap":{"0":{"start":{"line":5,"column":31},"end":{"line":5,"column":63}},"1":{"start":{"line":6,"column":22},"end":{"line":6,"column":39}},"2":{"start":{"line":7,"column":11},"end":{"line":7,"column":33}},"3":{"start":{"line":8,"column":31},"end":{"line":8,"column":50}},"4":{"start":{"line":9,"column":55},"end":{"line":9,"column":73}},"5":{"start":{"line":15,"column":4},"end":{"line":15,"column":26}},"6":{"start":{"line":27,"column":4},"end":{"line":27,"column":63}},"7":{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},"8":{"start":{"line":30,"column":6},"end":{"line":32,"column":8}},"9":{"start":{"line":35,"column":4},"end":{"line":35,"column":57}},"10":{"start":{"line":36,"column":4},"end":{"line":36,"column":85}},"11":{"start":{"line":37,"column":4},"end":{"line":37,"column":47}},"12":{"start":{"line":40,"column":4},"end":{"line":40,"column":53}},"13":{"start":{"line":43,"column":4},"end":{"line":46,"column":13}},"14":{"start":{"line":49,"column":4},"end":{"line":54,"column":6}},"15":{"start":{"line":63,"column":24},"end":{"line":63,"column":52}},"16":{"start":{"line":64,"column":23},"end":{"line":64,"column":53}},"17":{"start":{"line":65,"column":21},"end":{"line":65,"column":49}},"18":{"start":{"line":67,"column":4},"end":{"line":72,"column":6}},"19":{"start":{"line":81,"column":16},"end":{"line":81,"column":55}},"20":{"start":{"line":82,"column":22},"end":{"line":88,"column":5}},"21":{"start":{"line":89,"column":4},"end":{"line":89,"column":42}},"22":{"start":{"line":98,"column":23},"end":{"line":98,"column":53}},"23":{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},"24":{"start":{"line":101,"column":6},"end":{"line":101,"column":48}},"25":{"start":{"line":104,"column":4},"end":{"line":104,"column":24}},"26":{"start":{"line":121,"column":8},"end":{"line":121,"column":15}},"27":{"start":{"line":124,"column":18},"end":{"line":124,"column":50}},"28":{"start":{"line":127,"column":18},"end":{"line":131,"column":6}},"29":{"start":{"line":135,"column":4},"end":{"line":152,"column":5}},"30":{"start":{"line":136,"column":6},"end":{"line":141,"column":9}},"31":{"start":{"line":143,"column":6},"end":{"line":143,"column":33}},"32":{"start":{"line":144,"column":6},"end":{"line":144,"column":29}},"33":{"start":{"line":146,"column":6},"end":{"line":150,"column":7}},"34":{"start":{"line":147,"column":8},"end":{"line":149,"column":10}},"35":{"start":{"line":151,"column":6},"end":{"line":151,"column":18}},"36":{"start":{"line":155,"column":18},"end":{"line":155,"column":42}},"37":{"start":{"line":157,"column":4},"end":{"line":157,"column":53}},"38":{"start":{"line":172,"column":8},"end":{"line":172,"column":15}},"39":{"start":{"line":175,"column":18},"end":{"line":175,"column":50}},"40":{"start":{"line":178,"column":16},"end":{"line":178,"column":42}},"41":{"start":{"line":179,"column":21},"end":{"line":179,"column":30}},"42":{"start":{"line":180,"column":22},"end":{"line":180,"column":32}},"43":{"start":{"line":183,"column":18},"end":{"line":186,"column":6}},"44":{"start":{"line":190,"column":4},"end":{"line":207,"column":5}},"45":{"start":{"line":191,"column":6},"end":{"line":196,"column":9}},"46":{"start":{"line":198,"column":6},"end":{"line":198,"column":33}},"47":{"start":{"line":199,"column":6},"end":{"line":199,"column":29}},"48":{"start":{"line":201,"column":6},"end":{"line":205,"column":7}},"49":{"start":{"line":202,"column":8},"end":{"line":204,"column":10}},"50":{"start":{"line":206,"column":6},"end":{"line":206,"column":18}},"51":{"start":{"line":210,"column":18},"end":{"line":210,"column":42}},"52":{"start":{"line":211,"column":18},"end":{"line":211,"column":73}},"53":{"start":{"line":213,"column":4},"end":{"line":213,"column":54}},"54":{"start":{"line":233,"column":8},"end":{"line":233,"column":15}},"55":{"start":{"line":236,"column":19},"end":{"line":236,"column":59}},"56":{"start":{"line":239,"column":4},"end":{"line":250,"column":5}},"57":{"start":{"line":240,"column":6},"end":{"line":244,"column":9}},"58":{"start":{"line":246,"column":6},"end":{"line":249,"column":9}},"59":{"start":{"line":253,"column":4},"end":{"line":255,"column":5}},"60":{"start":{"line":254,"column":6},"end":{"line":254,"column":43}},"61":{"start":{"line":257,"column":4},"end":{"line":257,"column":18}},"62":{"start":{"line":261,"column":0},"end":{"line":261,"column":27}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":26,"column":2},"end":{"line":26,"column":3}},"loc":{"start":{"line":26,"column":28},"end":{"line":55,"column":3}},"line":26},"1":{"name":"(anonymous_1)","decl":{"start":{"line":62,"column":2},"end":{"line":62,"column":3}},"loc":{"start":{"line":62,"column":30},"end":{"line":73,"column":3}},"line":62},"2":{"name":"(anonymous_2)","decl":{"start":{"line":80,"column":2},"end":{"line":80,"column":3}},"loc":{"start":{"line":80,"column":25},"end":{"line":90,"column":3}},"line":80},"3":{"name":"(anonymous_3)","decl":{"start":{"line":97,"column":2},"end":{"line":97,"column":3}},"loc":{"start":{"line":97,"column":45},"end":{"line":105,"column":3}},"line":97},"4":{"name":"(anonymous_4)","decl":{"start":{"line":116,"column":2},"end":{"line":116,"column":3}},"loc":{"start":{"line":116,"column":45},"end":{"line":158,"column":3}},"line":116},"5":{"name":"(anonymous_5)","decl":{"start":{"line":168,"column":2},"end":{"line":168,"column":3}},"loc":{"start":{"line":168,"column":41},"end":{"line":214,"column":3}},"line":168},"6":{"name":"(anonymous_6)","decl":{"start":{"line":227,"column":2},"end":{"line":227,"column":3}},"loc":{"start":{"line":227,"column":51},"end":{"line":258,"column":3}},"line":227}},"branchMap":{"0":{"loc":{"start":{"line":26,"column":14},"end":{"line":26,"column":26}},"type":"default-arg","locations":[{"start":{"line":26,"column":24},"end":{"line":26,"column":26}}],"line":26},"1":{"loc":{"start":{"line":27,"column":18},"end":{"line":27,"column":62}},"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":32}},{"start":{"line":27,"column":36},"end":{"line":27,"column":62}}],"line":27},"2":{"loc":{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":33,"column":5}},{"start":{},"end":{}}],"line":29},"3":{"loc":{"start":{"line":35,"column":17},"end":{"line":35,"column":56}},"type":"binary-expr","locations":[{"start":{"line":35,"column":17},"end":{"line":35,"column":30}},{"start":{"line":35,"column":34},"end":{"line":35,"column":56}}],"line":35},"4":{"loc":{"start":{"line":36,"column":23},"end":{"line":36,"column":84}},"type":"cond-expr","locations":[{"start":{"line":36,"column":59},"end":{"line":36,"column":78}},{"start":{"line":36,"column":81},"end":{"line":36,"column":84}}],"line":36},"5":{"loc":{"start":{"line":37,"column":22},"end":{"line":37,"column":46}},"type":"binary-expr","locations":[{"start":{"line":37,"column":22},"end":{"line":37,"column":40}},{"start":{"line":37,"column":44},"end":{"line":37,"column":46}}],"line":37},"6":{"loc":{"start":{"line":89,"column":11},"end":{"line":89,"column":41}},"type":"binary-expr","locations":[{"start":{"line":89,"column":11},"end":{"line":89,"column":25}},{"start":{"line":89,"column":29},"end":{"line":89,"column":41}}],"line":89},"7":{"loc":{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},"type":"if","locations":[{"start":{"line":100,"column":4},"end":{"line":102,"column":5}},{"start":{},"end":{}}],"line":100},"8":{"loc":{"start":{"line":116,"column":31},"end":{"line":116,"column":43}},"type":"default-arg","locations":[{"start":{"line":116,"column":41},"end":{"line":116,"column":43}}],"line":116},"9":{"loc":{"start":{"line":118,"column":6},"end":{"line":118,"column":45}},"type":"default-arg","locations":[{"start":{"line":118,"column":15},"end":{"line":118,"column":45}}],"line":118},"10":{"loc":{"start":{"line":119,"column":6},"end":{"line":119,"column":31}},"type":"default-arg","locations":[{"start":{"line":119,"column":27},"end":{"line":119,"column":31}}],"line":119},"11":{"loc":{"start":{"line":120,"column":6},"end":{"line":120,"column":20}},"type":"default-arg","locations":[{"start":{"line":120,"column":16},"end":{"line":120,"column":20}}],"line":120},"12":{"loc":{"start":{"line":146,"column":6},"end":{"line":150,"column":7}},"type":"if","locations":[{"start":{"line":146,"column":6},"end":{"line":150,"column":7}},{"start":{},"end":{}}],"line":146},"13":{"loc":{"start":{"line":168,"column":27},"end":{"line":168,"column":39}},"type":"default-arg","locations":[{"start":{"line":168,"column":37},"end":{"line":168,"column":39}}],"line":168},"14":{"loc":{"start":{"line":170,"column":6},"end":{"line":170,"column":269}},"type":"default-arg","locations":[{"start":{"line":170,"column":15},"end":{"line":170,"column":269}}],"line":170},"15":{"loc":{"start":{"line":171,"column":6},"end":{"line":171,"column":20}},"type":"default-arg","locations":[{"start":{"line":171,"column":16},"end":{"line":171,"column":20}}],"line":171},"16":{"loc":{"start":{"line":201,"column":6},"end":{"line":205,"column":7}},"type":"if","locations":[{"start":{"line":201,"column":6},"end":{"line":205,"column":7}},{"start":{},"end":{}}],"line":201},"17":{"loc":{"start":{"line":227,"column":37},"end":{"line":227,"column":49}},"type":"default-arg","locations":[{"start":{"line":227,"column":47},"end":{"line":227,"column":49}}],"line":227},"18":{"loc":{"start":{"line":229,"column":6},"end":{"line":229,"column":23}},"type":"default-arg","locations":[{"start":{"line":229,"column":19},"end":{"line":229,"column":23}}],"line":229},"19":{"loc":{"start":{"line":230,"column":6},"end":{"line":230,"column":19}},"type":"default-arg","locations":[{"start":{"line":230,"column":18},"end":{"line":230,"column":19}}],"line":230},"20":{"loc":{"start":{"line":231,"column":6},"end":{"line":231,"column":19}},"type":"default-arg","locations":[{"start":{"line":231,"column":17},"end":{"line":231,"column":19}}],"line":231},"21":{"loc":{"start":{"line":232,"column":6},"end":{"line":232,"column":17}},"type":"default-arg","locations":[{"start":{"line":232,"column":14},"end":{"line":232,"column":17}}],"line":232},"22":{"loc":{"start":{"line":239,"column":4},"end":{"line":250,"column":5}},"type":"if","locations":[{"start":{"line":239,"column":4},"end":{"line":250,"column":5}},{"start":{"line":245,"column":11},"end":{"line":250,"column":5}}],"line":239},"23":{"loc":{"start":{"line":253,"column":4},"end":{"line":255,"column":5}},"type":"if","locations":[{"start":{"line":253,"column":4},"end":{"line":255,"column":5}},{"start":{},"end":{}}],"line":253}},"s":{"0":2,"1":2,"2":2,"3":2,"4":2,"5":2,"6":23,"7":23,"8":1,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":0,"16":0,"17":0,"18":0,"19":9,"20":9,"21":9,"22":3,"23":3,"24":1,"25":3,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":2},"f":{"0":23,"1":0,"2":9,"3":3,"4":0,"5":0,"6":0},"b":{"0":[2],"1":[23,2],"2":[1,22],"3":[22,21],"4":[2,20],"5":[22,17],"6":[9,2],"7":[1,2],"8":[0],"9":[0],"10":[0],"11":[0],"12":[0,0],"13":[0],"14":[0],"15":[0],"16":[0,0],"17":[0],"18":[0],"19":[0],"20":[0],"21":[0],"22":[0,0],"23":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"3b2c399c630d53b96e78d95a49182292a67e620d"}
|
|
2
2
|
,"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/index.js": {"path":"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/index.js","statementMap":{"0":{"start":{"line":12,"column":18},"end":{"line":12,"column":35}},"1":{"start":{"line":13,"column":62},"end":{"line":13,"column":81}},"2":{"start":{"line":15,"column":0},"end":{"line":15,"column":27}},"3":{"start":{"line":16,"column":0},"end":{"line":16,"column":37}},"4":{"start":{"line":17,"column":0},"end":{"line":17,"column":41}},"5":{"start":{"line":18,"column":0},"end":{"line":18,"column":51}},"6":{"start":{"line":19,"column":0},"end":{"line":19,"column":55}},"7":{"start":{"line":20,"column":0},"end":{"line":20,"column":33}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"919dc8d2b2062d2a9f4217ee076649d050f5f3a9"}
|
|
3
3
|
,"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/models.js": {"path":"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/models.js","statementMap":{"0":{"start":{"line":15,"column":4},"end":{"line":15,"column":23}},"1":{"start":{"line":16,"column":4},"end":{"line":16,"column":17}},"2":{"start":{"line":17,"column":4},"end":{"line":17,"column":17}},"3":{"start":{"line":18,"column":4},"end":{"line":18,"column":17}},"4":{"start":{"line":19,"column":4},"end":{"line":19,"column":17}},"5":{"start":{"line":29,"column":18},"end":{"line":29,"column":57}},"6":{"start":{"line":30,"column":18},"end":{"line":30,"column":58}},"7":{"start":{"line":31,"column":18},"end":{"line":31,"column":57}},"8":{"start":{"line":32,"column":18},"end":{"line":32,"column":58}},"9":{"start":{"line":33,"column":4},"end":{"line":33,"column":40}},"10":{"start":{"line":42,"column":16},"end":{"line":42,"column":27}},"11":{"start":{"line":43,"column":4},"end":{"line":49,"column":6}},"12":{"start":{"line":64,"column":4},"end":{"line":64,"column":17}},"13":{"start":{"line":65,"column":4},"end":{"line":65,"column":17}},"14":{"start":{"line":66,"column":4},"end":{"line":66,"column":17}},"15":{"start":{"line":67,"column":4},"end":{"line":67,"column":17}},"16":{"start":{"line":68,"column":4},"end":{"line":68,"column":21}},"17":{"start":{"line":69,"column":4},"end":{"line":69,"column":23}},"18":{"start":{"line":81,"column":4},"end":{"line":81,"column":23}},"19":{"start":{"line":82,"column":4},"end":{"line":82,"column":23}},"20":{"start":{"line":83,"column":4},"end":{"line":83,"column":35}},"21":{"start":{"line":91,"column":4},"end":{"line":91,"column":29}},"22":{"start":{"line":95,"column":0},"end":{"line":99,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":14,"column":2},"end":{"line":14,"column":3}},"loc":{"start":{"line":14,"column":37},"end":{"line":20,"column":3}},"line":14},"1":{"name":"(anonymous_1)","decl":{"start":{"line":28,"column":2},"end":{"line":28,"column":3}},"loc":{"start":{"line":28,"column":34},"end":{"line":34,"column":3}},"line":28},"2":{"name":"(anonymous_2)","decl":{"start":{"line":41,"column":2},"end":{"line":41,"column":3}},"loc":{"start":{"line":41,"column":24},"end":{"line":50,"column":3}},"line":41},"3":{"name":"(anonymous_3)","decl":{"start":{"line":63,"column":2},"end":{"line":63,"column":3}},"loc":{"start":{"line":63,"column":43},"end":{"line":70,"column":3}},"line":63},"4":{"name":"(anonymous_4)","decl":{"start":{"line":80,"column":2},"end":{"line":80,"column":3}},"loc":{"start":{"line":80,"column":55},"end":{"line":84,"column":3}},"line":80},"5":{"name":"(anonymous_5)","decl":{"start":{"line":90,"column":2},"end":{"line":90,"column":3}},"loc":{"start":{"line":90,"column":15},"end":{"line":92,"column":3}},"line":90}},"branchMap":{"0":{"loc":{"start":{"line":80,"column":21},"end":{"line":80,"column":33}},"type":"default-arg","locations":[{"start":{"line":80,"column":29},"end":{"line":80,"column":33}}],"line":80},"1":{"loc":{"start":{"line":80,"column":35},"end":{"line":80,"column":53}},"type":"default-arg","locations":[{"start":{"line":80,"column":49},"end":{"line":80,"column":53}}],"line":80}},"s":{"0":20,"1":20,"2":20,"3":20,"4":20,"5":3,"6":3,"7":3,"8":3,"9":3,"10":8,"11":8,"12":4,"13":4,"14":4,"15":4,"16":4,"17":4,"18":6,"19":6,"20":6,"21":3,"22":4},"f":{"0":20,"1":3,"2":8,"3":4,"4":6,"5":3},"b":{"0":[4],"1":[5]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"3d02bea040e833fecbb6ae9f688106aa3a88eb96"}
|
|
4
4
|
,"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/utils.js": {"path":"/Users/marcokotrotsos/NXTPHASE/visualsegmenting/node_vsegments/src/utils.js","statementMap":{"0":{"start":{"line":5,"column":42},"end":{"line":5,"column":61}},"1":{"start":{"line":6,"column":36},"end":{"line":6,"column":53}},"2":{"start":{"line":14,"column":16},"end":{"line":14,"column":38}},"3":{"start":{"line":15,"column":2},"end":{"line":21,"column":3}},"4":{"start":{"line":15,"column":15},"end":{"line":15,"column":16}},"5":{"start":{"line":16,"column":4},"end":{"line":20,"column":5}},"6":{"start":{"line":17,"column":6},"end":{"line":17,"column":49}},"7":{"start":{"line":18,"column":6},"end":{"line":18,"column":46}},"8":{"start":{"line":19,"column":6},"end":{"line":19,"column":12}},"9":{"start":{"line":22,"column":2},"end":{"line":22,"column":27}},"10":{"start":{"line":31,"column":22},"end":{"line":31,"column":45}},"11":{"start":{"line":32,"column":15},"end":{"line":32,"column":38}},"12":{"start":{"line":34,"column":16},"end":{"line":34,"column":18}},"13":{"start":{"line":35,"column":2},"end":{"line":39,"column":3}},"14":{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},"15":{"start":{"line":37,"column":6},"end":{"line":37,"column":45}},"16":{"start":{"line":41,"column":2},"end":{"line":41,"column":15}},"17":{"start":{"line":52,"column":22},"end":{"line":52,"column":45}},"18":{"start":{"line":53,"column":15},"end":{"line":53,"column":38}},"19":{"start":{"line":55,"column":16},"end":{"line":55,"column":18}},"20":{"start":{"line":57,"column":2},"end":{"line":109,"column":3}},"21":{"start":{"line":58,"column":4},"end":{"line":58,"column":45}},"22":{"start":{"line":58,"column":36},"end":{"line":58,"column":45}},"23":{"start":{"line":60,"column":16},"end":{"line":60,"column":27}},"24":{"start":{"line":61,"column":18},"end":{"line":61,"column":28}},"25":{"start":{"line":64,"column":18},"end":{"line":64,"column":57}},"26":{"start":{"line":65,"column":18},"end":{"line":65,"column":56}},"27":{"start":{"line":66,"column":18},"end":{"line":66,"column":57}},"28":{"start":{"line":67,"column":18},"end":{"line":67,"column":56}},"29":{"start":{"line":69,"column":22},"end":{"line":69,"column":35}},"30":{"start":{"line":70,"column":23},"end":{"line":70,"column":36}},"31":{"start":{"line":73,"column":23},"end":{"line":73,"column":72}},"32":{"start":{"line":74,"column":23},"end":{"line":74,"column":56}},"33":{"start":{"line":77,"column":20},"end":{"line":77,"column":47}},"34":{"start":{"line":78,"column":19},"end":{"line":78,"column":54}},"35":{"start":{"line":79,"column":16},"end":{"line":79,"column":39}},"36":{"start":{"line":80,"column":4},"end":{"line":80,"column":56}},"37":{"start":{"line":83,"column":22},"end":{"line":83,"column":67}},"38":{"start":{"line":84,"column":21},"end":{"line":84,"column":59}},"39":{"start":{"line":86,"column":4},"end":{"line":88,"column":5}},"40":{"start":{"line":86,"column":17},"end":{"line":86,"column":18}},"41":{"start":{"line":87,"column":6},"end":{"line":87,"column":46}},"42":{"start":{"line":91,"column":21},"end":{"line":91,"column":55}},"43":{"start":{"line":93,"column":4},"end":{"line":104,"column":5}},"44":{"start":{"line":93,"column":17},"end":{"line":93,"column":18}},"45":{"start":{"line":94,"column":6},"end":{"line":103,"column":7}},"46":{"start":{"line":94,"column":19},"end":{"line":94,"column":20}},"47":{"start":{"line":95,"column":23},"end":{"line":95,"column":40}},"48":{"start":{"line":96,"column":21},"end":{"line":96,"column":30}},"49":{"start":{"line":97,"column":21},"end":{"line":97,"column":30}},"50":{"start":{"line":99,"column":8},"end":{"line":102,"column":9}},"51":{"start":{"line":100,"column":25},"end":{"line":100,"column":47}},"52":{"start":{"line":101,"column":10},"end":{"line":101,"column":46}},"53":{"start":{"line":106,"column":4},"end":{"line":108,"column":7}},"54":{"start":{"line":111,"column":2},"end":{"line":111,"column":15}},"55":{"start":{"line":114,"column":0},"end":{"line":118,"column":2}}},"fnMap":{"0":{"name":"parseJson","decl":{"start":{"line":13,"column":9},"end":{"line":13,"column":18}},"loc":{"start":{"line":13,"column":31},"end":{"line":23,"column":1}},"line":13},"1":{"name":"parseBoundingBoxes","decl":{"start":{"line":30,"column":9},"end":{"line":30,"column":27}},"loc":{"start":{"line":30,"column":42},"end":{"line":42,"column":1}},"line":30},"2":{"name":"parseSegmentationMasks","decl":{"start":{"line":51,"column":15},"end":{"line":51,"column":37}},"loc":{"start":{"line":51,"column":73},"end":{"line":112,"column":1}},"line":51}},"branchMap":{"0":{"loc":{"start":{"line":16,"column":4},"end":{"line":20,"column":5}},"type":"if","locations":[{"start":{"line":16,"column":4},"end":{"line":20,"column":5}},{"start":{},"end":{}}],"line":16},"1":{"loc":{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},"type":"if","locations":[{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},{"start":{},"end":{}}],"line":36},"2":{"loc":{"start":{"line":58,"column":4},"end":{"line":58,"column":45}},"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":58,"column":45}},{"start":{},"end":{}}],"line":58},"3":{"loc":{"start":{"line":58,"column":8},"end":{"line":58,"column":34}},"type":"binary-expr","locations":[{"start":{"line":58,"column":8},"end":{"line":58,"column":20}},{"start":{"line":58,"column":24},"end":{"line":58,"column":34}}],"line":58},"4":{"loc":{"start":{"line":99,"column":8},"end":{"line":102,"column":9}},"type":"if","locations":[{"start":{"line":99,"column":8},"end":{"line":102,"column":9}},{"start":{},"end":{}}],"line":99},"5":{"loc":{"start":{"line":99,"column":12},"end":{"line":99,"column":47}},"type":"binary-expr","locations":[{"start":{"line":99,"column":12},"end":{"line":99,"column":28}},{"start":{"line":99,"column":32},"end":{"line":99,"column":47}}],"line":99}},"s":{"0":3,"1":3,"2":12,"3":12,"4":12,"5":13,"6":4,"7":4,"8":4,"9":12,"10":5,"11":5,"12":5,"13":5,"14":8,"15":7,"16":5,"17":2,"18":2,"19":2,"20":2,"21":3,"22":3,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":2,"55":3},"f":{"0":12,"1":5,"2":2},"b":{"0":[4,9],"1":[7,1],"2":[3,0],"3":[3,2],"4":[0,0],"5":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"c6222b511313a24a286eb18bc56c8b87e16a5c13"}
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">36.5% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>23/
|
|
28
|
+
<span class='fraction'>23/63</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">42.85% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>15/
|
|
35
|
+
<span class='fraction'>15/35</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">36.5% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>23/
|
|
49
|
+
<span class='fraction'>23/63</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -304,7 +304,27 @@
|
|
|
304
304
|
<a name='L239'></a><a href='#L239'>239</a>
|
|
305
305
|
<a name='L240'></a><a href='#L240'>240</a>
|
|
306
306
|
<a name='L241'></a><a href='#L241'>241</a>
|
|
307
|
-
<a name='L242'></a><a href='#L242'>242</a
|
|
307
|
+
<a name='L242'></a><a href='#L242'>242</a>
|
|
308
|
+
<a name='L243'></a><a href='#L243'>243</a>
|
|
309
|
+
<a name='L244'></a><a href='#L244'>244</a>
|
|
310
|
+
<a name='L245'></a><a href='#L245'>245</a>
|
|
311
|
+
<a name='L246'></a><a href='#L246'>246</a>
|
|
312
|
+
<a name='L247'></a><a href='#L247'>247</a>
|
|
313
|
+
<a name='L248'></a><a href='#L248'>248</a>
|
|
314
|
+
<a name='L249'></a><a href='#L249'>249</a>
|
|
315
|
+
<a name='L250'></a><a href='#L250'>250</a>
|
|
316
|
+
<a name='L251'></a><a href='#L251'>251</a>
|
|
317
|
+
<a name='L252'></a><a href='#L252'>252</a>
|
|
318
|
+
<a name='L253'></a><a href='#L253'>253</a>
|
|
319
|
+
<a name='L254'></a><a href='#L254'>254</a>
|
|
320
|
+
<a name='L255'></a><a href='#L255'>255</a>
|
|
321
|
+
<a name='L256'></a><a href='#L256'>256</a>
|
|
322
|
+
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
|
+
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
|
+
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
+
<a name='L261'></a><a href='#L261'>261</a>
|
|
327
|
+
<a name='L262'></a><a href='#L262'>262</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
308
328
|
<span class="cline-any cline-neutral"> </span>
|
|
309
329
|
<span class="cline-any cline-neutral"> </span>
|
|
310
330
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -437,17 +457,27 @@
|
|
|
437
457
|
<span class="cline-any cline-neutral"> </span>
|
|
438
458
|
<span class="cline-any cline-neutral"> </span>
|
|
439
459
|
<span class="cline-any cline-neutral"> </span>
|
|
460
|
+
<span class="cline-any cline-neutral"> </span>
|
|
440
461
|
<span class="cline-any cline-no"> </span>
|
|
462
|
+
<span class="cline-any cline-no"> </span>
|
|
463
|
+
<span class="cline-any cline-neutral"> </span>
|
|
441
464
|
<span class="cline-any cline-neutral"> </span>
|
|
442
465
|
<span class="cline-any cline-neutral"> </span>
|
|
443
466
|
<span class="cline-any cline-neutral"> </span>
|
|
444
467
|
<span class="cline-any cline-neutral"> </span>
|
|
445
468
|
<span class="cline-any cline-neutral"> </span>
|
|
469
|
+
<span class="cline-any cline-no"> </span>
|
|
470
|
+
<span class="cline-any cline-no"> </span>
|
|
446
471
|
<span class="cline-any cline-neutral"> </span>
|
|
447
472
|
<span class="cline-any cline-no"> </span>
|
|
448
473
|
<span class="cline-any cline-no"> </span>
|
|
449
474
|
<span class="cline-any cline-neutral"> </span>
|
|
450
475
|
<span class="cline-any cline-neutral"> </span>
|
|
476
|
+
<span class="cline-any cline-neutral"> </span>
|
|
477
|
+
<span class="cline-any cline-no"> </span>
|
|
478
|
+
<span class="cline-any cline-neutral"> </span>
|
|
479
|
+
<span class="cline-any cline-neutral"> </span>
|
|
480
|
+
<span class="cline-any cline-neutral"> </span>
|
|
451
481
|
<span class="cline-any cline-no"> </span>
|
|
452
482
|
<span class="cline-any cline-neutral"> </span>
|
|
453
483
|
<span class="cline-any cline-no"> </span>
|
|
@@ -482,17 +512,27 @@
|
|
|
482
512
|
<span class="cline-any cline-neutral"> </span>
|
|
483
513
|
<span class="cline-any cline-neutral"> </span>
|
|
484
514
|
<span class="cline-any cline-neutral"> </span>
|
|
515
|
+
<span class="cline-any cline-neutral"> </span>
|
|
485
516
|
<span class="cline-any cline-no"> </span>
|
|
517
|
+
<span class="cline-any cline-no"> </span>
|
|
518
|
+
<span class="cline-any cline-neutral"> </span>
|
|
486
519
|
<span class="cline-any cline-neutral"> </span>
|
|
487
520
|
<span class="cline-any cline-neutral"> </span>
|
|
488
521
|
<span class="cline-any cline-neutral"> </span>
|
|
489
522
|
<span class="cline-any cline-neutral"> </span>
|
|
490
523
|
<span class="cline-any cline-neutral"> </span>
|
|
524
|
+
<span class="cline-any cline-no"> </span>
|
|
525
|
+
<span class="cline-any cline-no"> </span>
|
|
491
526
|
<span class="cline-any cline-neutral"> </span>
|
|
492
527
|
<span class="cline-any cline-no"> </span>
|
|
493
528
|
<span class="cline-any cline-no"> </span>
|
|
494
529
|
<span class="cline-any cline-neutral"> </span>
|
|
495
530
|
<span class="cline-any cline-neutral"> </span>
|
|
531
|
+
<span class="cline-any cline-neutral"> </span>
|
|
532
|
+
<span class="cline-any cline-no"> </span>
|
|
533
|
+
<span class="cline-any cline-neutral"> </span>
|
|
534
|
+
<span class="cline-any cline-neutral"> </span>
|
|
535
|
+
<span class="cline-any cline-neutral"> </span>
|
|
496
536
|
<span class="cline-any cline-no"> </span>
|
|
497
537
|
<span class="cline-any cline-no"> </span>
|
|
498
538
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -579,7 +619,7 @@ class VSegments {
|
|
|
579
619
|
);
|
|
580
620
|
}
|
|
581
621
|
|
|
582
|
-
this.model = options.model || 'gemini-
|
|
622
|
+
this.model = options.model || 'gemini-3-pro-preview';
|
|
583
623
|
this.temperature = options.temperature !== undefined ? options.temperature : 0.5;
|
|
584
624
|
this.maxObjects = options.maxObjects || 25;
|
|
585
625
|
|
|
@@ -678,15 +718,25 @@ If an object is present multiple times, name them according to their unique char
|
|
|
678
718
|
});
|
|
679
719
|
|
|
680
720
|
// Generate content
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
721
|
+
let result, response, text;
|
|
722
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
723
|
+
<span class="cstat-no" title="statement not covered" > result = await model.generateContent({</span>
|
|
724
|
+
contents: [{ role: 'user', parts: [{ text: prompt }, image] }],
|
|
725
|
+
generationConfig: {
|
|
726
|
+
temperature: this.temperature,
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
|
|
730
|
+
<span class="cstat-no" title="statement not covered" > response = result.response;</span>
|
|
731
|
+
<span class="cstat-no" title="statement not covered" > text = response.text();</span>
|
|
732
|
+
} catch (error) {
|
|
733
|
+
<span class="cstat-no" title="statement not covered" > if (error.status === 500) {</span>
|
|
734
|
+
<span class="cstat-no" title="statement not covered" > throw new Error(</span>
|
|
735
|
+
`Google Gemini API error (500): This may be a temporary issue. Try again later or verify your API key and image. Original error: ${error.message}`
|
|
736
|
+
);
|
|
685
737
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
const response = <span class="cstat-no" title="statement not covered" >result.response;</span>
|
|
689
|
-
const text = <span class="cstat-no" title="statement not covered" >response.text();</span>
|
|
738
|
+
<span class="cstat-no" title="statement not covered" > throw error;</span>
|
|
739
|
+
}
|
|
690
740
|
|
|
691
741
|
// Parse response
|
|
692
742
|
const boxes = <span class="cstat-no" title="statement not covered" >parseBoundingBoxes(text);</span>
|
|
@@ -723,15 +773,25 @@ If an object is present multiple times, name them according to their unique char
|
|
|
723
773
|
});
|
|
724
774
|
|
|
725
775
|
// Generate content
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
776
|
+
let result, response, text;
|
|
777
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
778
|
+
<span class="cstat-no" title="statement not covered" > result = await model.generateContent({</span>
|
|
779
|
+
contents: [{ role: 'user', parts: [{ text: prompt }, image] }],
|
|
780
|
+
generationConfig: {
|
|
781
|
+
temperature: this.temperature,
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
<span class="cstat-no" title="statement not covered" > response = result.response;</span>
|
|
786
|
+
<span class="cstat-no" title="statement not covered" > text = response.text();</span>
|
|
787
|
+
} catch (error) {
|
|
788
|
+
<span class="cstat-no" title="statement not covered" > if (error.status === 500) {</span>
|
|
789
|
+
<span class="cstat-no" title="statement not covered" > throw new Error(</span>
|
|
790
|
+
`Google Gemini API error (500): This may be a temporary issue. Try again later or verify your API key and image. Original error: ${error.message}`
|
|
791
|
+
);
|
|
730
792
|
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
const response = <span class="cstat-no" title="statement not covered" >result.response;</span>
|
|
734
|
-
const text = <span class="cstat-no" title="statement not covered" >response.text();</span>
|
|
793
|
+
<span class="cstat-no" title="statement not covered" > throw error;</span>
|
|
794
|
+
}
|
|
735
795
|
|
|
736
796
|
// Parse response
|
|
737
797
|
const boxes = <span class="cstat-no" title="statement not covered" >parseBoundingBoxes(text);</span>
|
|
@@ -793,7 +853,7 @@ module.exports = VSegments;
|
|
|
793
853
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
794
854
|
Code coverage generated by
|
|
795
855
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
796
|
-
at 2025-12-05T12:
|
|
856
|
+
at 2025-12-05T12:45:03.605Z
|
|
797
857
|
</div>
|
|
798
858
|
<script src="prettify.js"></script>
|
|
799
859
|
<script>
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">38.7% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>84/
|
|
28
|
+
<span class='fraction'>84/217</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">32.87% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>24/
|
|
35
|
+
<span class='fraction'>24/73</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">38.86% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>82/
|
|
49
|
+
<span class='fraction'>82/211</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
82
|
<td class="file low" data-value="core.js"><a href="core.js.html">core.js</a></td>
|
|
83
|
-
<td data-value="
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
83
|
+
<td data-value="36.5" class="pic low">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 36%"></div><div class="cover-empty" style="width: 64%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="
|
|
86
|
+
<td data-value="36.5" class="pct low">36.5%</td>
|
|
87
|
+
<td data-value="63" class="abs low">23/63</td>
|
|
88
|
+
<td data-value="42.85" class="pct low">42.85%</td>
|
|
89
|
+
<td data-value="35" class="abs low">15/35</td>
|
|
90
90
|
<td data-value="42.85" class="pct low">42.85%</td>
|
|
91
91
|
<td data-value="7" class="abs low">3/7</td>
|
|
92
|
-
<td data-value="
|
|
93
|
-
<td data-value="
|
|
92
|
+
<td data-value="36.5" class="pct low">36.5%</td>
|
|
93
|
+
<td data-value="63" class="abs low">23/63</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at 2025-12-05T12:
|
|
164
|
+
at 2025-12-05T12:45:03.605Z
|
|
165
165
|
</div>
|
|
166
166
|
<script src="prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -130,7 +130,7 @@ module.exports.version = '0.1.0';
|
|
|
130
130
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
131
131
|
Code coverage generated by
|
|
132
132
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
133
|
-
at 2025-12-05T12:
|
|
133
|
+
at 2025-12-05T12:45:03.605Z
|
|
134
134
|
</div>
|
|
135
135
|
<script src="prettify.js"></script>
|
|
136
136
|
<script>
|
|
@@ -367,7 +367,7 @@ module.exports = {
|
|
|
367
367
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
368
368
|
Code coverage generated by
|
|
369
369
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
370
|
-
at 2025-12-05T12:
|
|
370
|
+
at 2025-12-05T12:45:03.605Z
|
|
371
371
|
</div>
|
|
372
372
|
<script src="prettify.js"></script>
|
|
373
373
|
<script>
|
|
@@ -424,7 +424,7 @@ module.exports = {
|
|
|
424
424
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
425
425
|
Code coverage generated by
|
|
426
426
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
427
|
-
at 2025-12-05T12:
|
|
427
|
+
at 2025-12-05T12:45:03.605Z
|
|
428
428
|
</div>
|
|
429
429
|
<script src="prettify.js"></script>
|
|
430
430
|
<script>
|
|
@@ -616,7 +616,7 @@ module.exports = {
|
|
|
616
616
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
617
617
|
Code coverage generated by
|
|
618
618
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
619
|
-
at 2025-12-05T12:
|
|
619
|
+
at 2025-12-05T12:45:03.605Z
|
|
620
620
|
</div>
|
|
621
621
|
<script src="prettify.js"></script>
|
|
622
622
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -5,8 +5,8 @@ FN:62,(anonymous_1)
|
|
|
5
5
|
FN:80,(anonymous_2)
|
|
6
6
|
FN:97,(anonymous_3)
|
|
7
7
|
FN:116,(anonymous_4)
|
|
8
|
-
FN:
|
|
9
|
-
FN:
|
|
8
|
+
FN:168,(anonymous_5)
|
|
9
|
+
FN:227,(anonymous_6)
|
|
10
10
|
FNF:7
|
|
11
11
|
FNH:3
|
|
12
12
|
FNDA:23,(anonymous_0)
|
|
@@ -45,33 +45,41 @@ DA:104,3
|
|
|
45
45
|
DA:121,0
|
|
46
46
|
DA:124,0
|
|
47
47
|
DA:127,0
|
|
48
|
-
DA:
|
|
49
|
-
DA:
|
|
50
|
-
DA:
|
|
51
|
-
DA:
|
|
48
|
+
DA:135,0
|
|
49
|
+
DA:136,0
|
|
50
|
+
DA:143,0
|
|
51
|
+
DA:144,0
|
|
52
|
+
DA:146,0
|
|
52
53
|
DA:147,0
|
|
53
|
-
DA:
|
|
54
|
-
DA:
|
|
55
|
-
DA:
|
|
56
|
-
DA:
|
|
57
|
-
DA:
|
|
58
|
-
DA:
|
|
54
|
+
DA:151,0
|
|
55
|
+
DA:155,0
|
|
56
|
+
DA:157,0
|
|
57
|
+
DA:172,0
|
|
58
|
+
DA:175,0
|
|
59
|
+
DA:178,0
|
|
59
60
|
DA:179,0
|
|
60
|
-
DA:
|
|
61
|
-
DA:
|
|
61
|
+
DA:180,0
|
|
62
|
+
DA:183,0
|
|
62
63
|
DA:190,0
|
|
63
64
|
DA:191,0
|
|
64
|
-
DA:
|
|
65
|
+
DA:198,0
|
|
66
|
+
DA:199,0
|
|
67
|
+
DA:201,0
|
|
68
|
+
DA:202,0
|
|
69
|
+
DA:206,0
|
|
70
|
+
DA:210,0
|
|
71
|
+
DA:211,0
|
|
65
72
|
DA:213,0
|
|
66
|
-
DA:216,0
|
|
67
|
-
DA:219,0
|
|
68
|
-
DA:220,0
|
|
69
|
-
DA:226,0
|
|
70
73
|
DA:233,0
|
|
71
|
-
DA:
|
|
72
|
-
DA:
|
|
73
|
-
DA:
|
|
74
|
-
|
|
74
|
+
DA:236,0
|
|
75
|
+
DA:239,0
|
|
76
|
+
DA:240,0
|
|
77
|
+
DA:246,0
|
|
78
|
+
DA:253,0
|
|
79
|
+
DA:254,0
|
|
80
|
+
DA:257,0
|
|
81
|
+
DA:261,2
|
|
82
|
+
LF:63
|
|
75
83
|
LH:23
|
|
76
84
|
BRDA:26,0,0,2
|
|
77
85
|
BRDA:27,1,0,23
|
|
@@ -92,19 +100,23 @@ BRDA:116,8,0,0
|
|
|
92
100
|
BRDA:118,9,0,0
|
|
93
101
|
BRDA:119,10,0,0
|
|
94
102
|
BRDA:120,11,0,0
|
|
95
|
-
BRDA:
|
|
96
|
-
BRDA:
|
|
97
|
-
BRDA:
|
|
98
|
-
BRDA:
|
|
99
|
-
BRDA:
|
|
100
|
-
BRDA:
|
|
101
|
-
BRDA:
|
|
102
|
-
BRDA:
|
|
103
|
-
BRDA:
|
|
104
|
-
BRDA:
|
|
105
|
-
BRDA:
|
|
106
|
-
BRDA:
|
|
107
|
-
|
|
103
|
+
BRDA:146,12,0,0
|
|
104
|
+
BRDA:146,12,1,0
|
|
105
|
+
BRDA:168,13,0,0
|
|
106
|
+
BRDA:170,14,0,0
|
|
107
|
+
BRDA:171,15,0,0
|
|
108
|
+
BRDA:201,16,0,0
|
|
109
|
+
BRDA:201,16,1,0
|
|
110
|
+
BRDA:227,17,0,0
|
|
111
|
+
BRDA:229,18,0,0
|
|
112
|
+
BRDA:230,19,0,0
|
|
113
|
+
BRDA:231,20,0,0
|
|
114
|
+
BRDA:232,21,0,0
|
|
115
|
+
BRDA:239,22,0,0
|
|
116
|
+
BRDA:239,22,1,0
|
|
117
|
+
BRDA:253,23,0,0
|
|
118
|
+
BRDA:253,23,1,0
|
|
119
|
+
BRF:35
|
|
108
120
|
BRH:15
|
|
109
121
|
end_of_record
|
|
110
122
|
TN:
|
package/package.json
CHANGED
package/src/core.js
CHANGED
|
@@ -32,7 +32,7 @@ class VSegments {
|
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
this.model = options.model || 'gemini-
|
|
35
|
+
this.model = options.model || 'gemini-3-pro-preview';
|
|
36
36
|
this.temperature = options.temperature !== undefined ? options.temperature : 0.5;
|
|
37
37
|
this.maxObjects = options.maxObjects || 25;
|
|
38
38
|
|
|
@@ -131,15 +131,25 @@ If an object is present multiple times, name them according to their unique char
|
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
// Generate content
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
let result, response, text;
|
|
135
|
+
try {
|
|
136
|
+
result = await model.generateContent({
|
|
137
|
+
contents: [{ role: 'user', parts: [{ text: prompt }, image] }],
|
|
138
|
+
generationConfig: {
|
|
139
|
+
temperature: this.temperature,
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
response = result.response;
|
|
144
|
+
text = response.text();
|
|
145
|
+
} catch (error) {
|
|
146
|
+
if (error.status === 500) {
|
|
147
|
+
throw new Error(
|
|
148
|
+
`Google Gemini API error (500): This may be a temporary issue. Try again later or verify your API key and image. Original error: ${error.message}`
|
|
149
|
+
);
|
|
138
150
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const response = result.response;
|
|
142
|
-
const text = response.text();
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
143
153
|
|
|
144
154
|
// Parse response
|
|
145
155
|
const boxes = parseBoundingBoxes(text);
|
|
@@ -176,15 +186,25 @@ If an object is present multiple times, name them according to their unique char
|
|
|
176
186
|
});
|
|
177
187
|
|
|
178
188
|
// Generate content
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
let result, response, text;
|
|
190
|
+
try {
|
|
191
|
+
result = await model.generateContent({
|
|
192
|
+
contents: [{ role: 'user', parts: [{ text: prompt }, image] }],
|
|
193
|
+
generationConfig: {
|
|
194
|
+
temperature: this.temperature,
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
response = result.response;
|
|
199
|
+
text = response.text();
|
|
200
|
+
} catch (error) {
|
|
201
|
+
if (error.status === 500) {
|
|
202
|
+
throw new Error(
|
|
203
|
+
`Google Gemini API error (500): This may be a temporary issue. Try again later or verify your API key and image. Original error: ${error.message}`
|
|
204
|
+
);
|
|
183
205
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const response = result.response;
|
|
187
|
-
const text = response.text();
|
|
206
|
+
throw error;
|
|
207
|
+
}
|
|
188
208
|
|
|
189
209
|
// Parse response
|
|
190
210
|
const boxes = parseBoundingBoxes(text);
|