{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dual-stage-hyperspectral-image-classification","title":"Dual-stage Hyperspectral Image Classification Model with Spectral Supertoken","arxiv_id":"2407.07307","date":"2024-07-10","proceeding":null,"authors":["Peifu Liu","Tingfa Xu","Jie Wang","Huan Chen","Huiyan Bai","Jianan Li"],"abstract":"Hyperspectral image classification, a task that assigns pre-defined classes to each pixel in a hyperspectral image of remote sensing scenes, often faces challenges due to the neglect of correlations between spectrally similar pixels. This oversight can lead to inaccurate edge definitions and difficulties in managing minor spectral variations in contiguous areas. To address these issues, we introduce the novel Dual-stage Spectral Supertoken Classifier (DSTC), inspired by superpixel concepts. DSTC employs spectrum-derivative-based pixel clustering to group pixels with similar spectral characteristics into spectral supertokens. By projecting the classification of these tokens onto the image space, we achieve pixel-level results that maintain regional classification consistency and precise boundary. Moreover, recognizing the diversity within tokens, we propose a class-proportion-based soft label. This label adaptively assigns weights to different categories based on their prevalence, effectively managing data distribution imbalances and enhancing classification performance. Comprehensive experiments on WHU-OHS, IP, KSC, and UP datasets corroborate the robust classification capabilities of DSTC and the effectiveness of its individual components. Code will be publicly available at https://github.com/laprf/DSTC.","url_abs":"https://arxiv.org/abs/2407.07307v2","url_pdf":"https://arxiv.org/pdf/2407.07307v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dual-stage-hyperspectral-image-classification","repo_url":"https://github.com/laprf/dstc","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"classification-consistency","task_name":"Classification Consistency"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"hyperspectral-image-classification","task_name":"Hyperspectral Image Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"robust-classification","task_name":"Robust classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2407.07307","atlas_url":"https://app.syntology.ai/?focus=2407.07307","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.07307"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/laprf/DSTC","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_draft_wrong":2,"ran_violates":1,"unverified":1},"by_repo_kind":{"official":{"samples":10,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"f1e2c241d1477b22","entry":"calc_init_centroid","repo":"laprf/DSTC","repo_kind":"official","path":"models/spectrum_pixel_clustering.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/spectrum_pixel_clustering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f1e2c241d1477b22"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"laprf/DSTC","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/backbones/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"laprf/DSTC","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/backbones/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"3bbee3fdbaa9a49c","entry":"eval_metrics","repo":"laprf/DSTC","repo_kind":"official","path":"utils.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3bbee3fdbaa9a49c"}},{"code_sha256_prefix":"39211e5a81221984","entry":"gen_confusion_matrix","repo":"laprf/DSTC","repo_kind":"official","path":"utils.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39211e5a81221984"}},{"code_sha256_prefix":"1734eddf367034e5","entry":"get_abs_indices","repo":"laprf/DSTC","repo_kind":"official","path":"models/spectrum_pixel_clustering.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/spectrum_pixel_clustering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1734eddf367034e5"}},{"code_sha256_prefix":"f107a08f7755da7d","entry":"map_to_color","repo":"laprf/DSTC","repo_kind":"official","path":"utils.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f107a08f7755da7d"}},{"code_sha256_prefix":"6ba8cee9f5daea41","entry":"pair","repo":"laprf/DSTC","repo_kind":"official","path":"models/VIT.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/VIT.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba8cee9f5daea41"}},{"code_sha256_prefix":"eaaf99334934adca","entry":"shifted_window_attention","repo":"laprf/DSTC","repo_kind":"official","path":"models/backbones/swin.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/backbones/swin.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eaaf99334934adca"}},{"code_sha256_prefix":"8ce3c48d2fc05746","entry":"resnet18","repo":"laprf/DSTC","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/laprf/DSTC/blob/HEAD/models/backbones/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ce3c48d2fc05746"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}