classify.js 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Aroz Photo
  3. Image Classification Script
  4. Generate classification for the given image path
  5. */
  6. requirelib("filelib");
  7. requirelib("imagelib");
  8. includes("imagedb.js");
  9. function returnError(msg){
  10. sendJSONResp(JSON.stringify({"error": msg}));
  11. }
  12. function main(){
  13. var roots = getAllPossibleRoots();
  14. for (var i = 0; i < roots.length; i++){
  15. var thisVroot = roots[i];
  16. //Load all tags record for this vroot
  17. var tagsRecords = loadAllTagsRecord(thisVroot);
  18. //Clear up all images tags that no longer exists
  19. tagsRecords = matchAndClearNonExistsRecords(tagsRecords);
  20. //Do resummarize of tags info
  21. //Scan for new images that is not classified and add them to the root tag file
  22. //
  23. }
  24. }
  25. main();