Repository navigation
fix(curation): say why a region yields no frame, and pin the Ukrainian zones - #101
Merged
Merged
Conversation
…n zones Issue #45: the daily pool holds no place from Ukraine. Offline, the plan is not the cause. pool.py's UA zone takes Kyiv, Lviv, Odesa, Vinnytsia, Uzhhorod and Chernivtsi and leaves out Kharkiv, Zaporizhzhia, Kherson, the Donbas and Crimea, and Ukraine is in the borders under "UA". The plans of batch-003, batch-004 and the two free batches name 34 Ukrainian regions, and harvest.py took a frame from one; the other countries average about 75%. Russia is next, 9 of 33. batch-002 harvested none of its 8 Ukrainian cities. So the frames are lost inside harvest.py's tile and frame filters, and which one cannot be told without a Mapillary token: the quality score, the 2048 px width, the sharpness bar, the 40 nearest frames of a town, or a tile that holds no panorama. harvest.py now counts every pass over a tile or a frame by step, per country of the plan, prints the table and writes rejects.json, so one run with the token names the step. test_curation.py checks offline, with no network, that the west and the centre of Ukraine are planned in and the front line, the occupied land and Crimea stay out, and that each reason is counted as it should be. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
|
Ran this against the real API: the counts pin it down, see #45 — Mapillary returns no thumbnail URLs for any frame in Ukraine. The diagnostics here did their job; the PR stays useful as is. |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #45. The cause is narrowed to
harvest.py's tile and frame filters, but it is not named: that needs one run with a Mapillary token. This PR makes that run name it. The issue stays open.Cause (what is established)
pool.allowed("UA", …)takes Kyiv, Lviv, Odesa, Vinnytsia, Uzhhorod, Chernivtsi, Ivano-Frankivsk, Zhytomyr, Rivne and Cherkasy, and leaves out Kharkiv, Zaporizhzhia, Kherson, Mariupol, Donetsk, Luhansk, Sumy and Crimea. Ukraine is in the borders underUA, socountry_ofagrees. About 54% of the country's area passes.UAweighs 3; the plans ofbatch-003,batch-004,batch-free-001andbatch-free-002name 34 Ukrainian regions (7 big cities twice, towns, roads).batch-002(the built-in list) harvested none of its 8 Ukrainian cities. The daily pool has no place from Ukraine because there was no candidate to approve;batch-free-001's one frame went into the free pool.Fix
harvest.pycounts each pass over a tile or a frame by step, per country of the plan (per region for the built-in list), prints the table at the end and writes<out>/rejects.json.scripts/curation/test_curation.py(new, no network, no token): the Ukrainian west and centre are planned in; the front line, occupied land and Crimea stay out; random points ofrandom_instay in Ukraine and in the kept zone; each rejection reason is counted as intended.Verified
python -m unittest scripts/curation/test_curation.py: 8 tests pass (shapely 2.0.7, mapbox-vector-tile, pillow).harvest.main()run on a two-entry Ukrainian plan against a faked tile: printsUA: panoramas, none at quality 0.7 24and writesrejects.json.Next
Run
MAPILLARY_TOKEN=… MAPLY_POOL=<plan with UA> python scripts/curation/harvest.py <out>(for exampleMAPLY_COUNTRIES=UA python scripts/curation/pool.py plan.json 10 30 30first) and readrejects.json. The step with the most passes forUAis the cause; the fix follows from it.