Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • P Python.Assignments
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Yordan Itsov
  • Python.Assignments
  • Issues
  • #10

Test color clustering on our dataset images

Use the color model fitted by DBSCAN in your Jupyter notebook to classify color in our dataset source images.

  • Iterate over all source images in valmap-small-dataset- the original satellite images sized 1000x1000 pixels, in our dataset (images named [SOMENUMBER].jpg, etc.)
  • For each image, compute a binary mask. For each pixel in the source image, classify the pixel color (compute the label by our model). If the label is -1 in our DBSCAN model, it means the pixel is an anomaly and it does not belong to the learned color space, in other words, it does not probably belong to the road. If the label is 0 or greater, the pixel is probably a road pixel. You will probably need to iterate the original image pixels by two nested cycles (slow), or you can use np.unique to get just list of colors topgether wiuth indices into original image, which can be faster.
  • Save the mask as [SOMENUMBER].road-dbscan.png.
  • You can tweak the parameters of DBSCAN method to see if different parameters yield more sensible results. If you try multiple combinations of parameters, save the resulting images as [SOMENUMBER].road-dbscan-1.png, [SOMENUMBER].road-dbscan-2.png etc. Save the images in a separate directory tree outside the dataset (use subdirectories like topgis-dc, topgis-old24, ... to mimic the structure of the original dataset).
Edited Jul 28, 2021 by Miroslav Uller
Assignee
Assign to
Time tracking